Skip to content

Commit

Permalink
chore(observability): fix tokio unstable (vectordotdev#18776)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmith3197 authored Oct 10, 2023
1 parent d9aca80 commit 67c4beb
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 67c4beb

Please sign in to comment.