Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tokio-util/src/task/join_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ where
/// This method panics if called outside of a Tokio runtime.
///
/// [`join_one`]: Self::join_one
#[track_caller]
pub fn spawn<F>(&mut self, key: K, task: F)
where
F: Future<Output = V>,
Expand All @@ -304,6 +305,7 @@ where
/// *not* return a cancelled [`JoinError`] for that task.
///
/// [`join_one`]: Self::join_one
#[track_caller]
pub fn spawn_on<F>(&mut self, key: K, task: F, handle: &Handle)
where
F: Future<Output = V>,
Expand All @@ -328,6 +330,7 @@ where
///
/// [`LocalSet`]: tokio::task::LocalSet
/// [`join_one`]: Self::join_one
#[track_caller]
pub fn spawn_local<F>(&mut self, key: K, task: F)
where
F: Future<Output = V>,
Expand All @@ -347,6 +350,7 @@ where
///
/// [`LocalSet`]: tokio::task::LocalSet
/// [`join_one`]: Self::join_one
#[track_caller]
pub fn spawn_local_on<F>(&mut self, key: K, task: F, local_set: &LocalSet)
where
F: Future<Output = V>,
Expand Down
4 changes: 4 additions & 0 deletions tokio/src/task/join_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ impl<T: 'static> JoinSet<T> {
/// This method panics if called outside of a Tokio runtime.
///
/// [`AbortHandle`]: crate::task::AbortHandle
#[track_caller]
pub fn spawn<F>(&mut self, task: F) -> AbortHandle
where
F: Future<Output = T>,
Expand All @@ -95,6 +96,7 @@ impl<T: 'static> JoinSet<T> {
/// cancel the task.
///
/// [`AbortHandle`]: crate::task::AbortHandle
#[track_caller]
pub fn spawn_on<F>(&mut self, task: F, handle: &Handle) -> AbortHandle
where
F: Future<Output = T>,
Expand All @@ -114,6 +116,7 @@ impl<T: 'static> JoinSet<T> {
///
/// [`LocalSet`]: crate::task::LocalSet
/// [`AbortHandle`]: crate::task::AbortHandle
#[track_caller]
pub fn spawn_local<F>(&mut self, task: F) -> AbortHandle
where
F: Future<Output = T>,
Expand All @@ -128,6 +131,7 @@ impl<T: 'static> JoinSet<T> {
///
/// [`LocalSet`]: crate::task::LocalSet
/// [`AbortHandle`]: crate::task::AbortHandle
#[track_caller]
pub fn spawn_local_on<F>(&mut self, task: F, local_set: &LocalSet) -> AbortHandle
where
F: Future<Output = T>,
Expand Down