Skip to content

Commit

Permalink
chore(observability): fix tokio unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmith3197 committed Oct 5, 2023
1 parent afc166f commit 040dfd1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/vector-buffers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ where
T: Send + 'static,
{
#[cfg(tokio_unstable)]
return tokio::task::Builder::new().name(_name).spawn(task);
return tokio::task::Builder::new()
.name(_name)
.spawn(task)
.expect("tokio task should spawn");

#[cfg(not(tokio_unstable))]
tokio::spawn(task)
Expand Down
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,10 @@ where
T: Send + 'static,
{
#[cfg(tokio_unstable)]
return tokio::task::Builder::new().name(_name).spawn(task);
return tokio::task::Builder::new()
.name(_name)
.spawn(task)
.expect("tokio task should spawn");

#[cfg(not(tokio_unstable))]
tokio::spawn(task)
Expand Down

0 comments on commit 040dfd1

Please sign in to comment.