diff --git a/tokio-util/src/task/join_map.rs b/tokio-util/src/task/join_map.rs index 41c82f448ab..299c92faed3 100644 --- a/tokio-util/src/task/join_map.rs +++ b/tokio-util/src/task/join_map.rs @@ -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(&mut self, key: K, task: F) where F: Future, @@ -304,6 +305,7 @@ where /// *not* return a cancelled [`JoinError`] for that task. /// /// [`join_one`]: Self::join_one + #[track_caller] pub fn spawn_on(&mut self, key: K, task: F, handle: &Handle) where F: Future, @@ -328,6 +330,7 @@ where /// /// [`LocalSet`]: tokio::task::LocalSet /// [`join_one`]: Self::join_one + #[track_caller] pub fn spawn_local(&mut self, key: K, task: F) where F: Future, @@ -347,6 +350,7 @@ where /// /// [`LocalSet`]: tokio::task::LocalSet /// [`join_one`]: Self::join_one + #[track_caller] pub fn spawn_local_on(&mut self, key: K, task: F, local_set: &LocalSet) where F: Future, diff --git a/tokio/src/task/join_set.rs b/tokio/src/task/join_set.rs index d036fcc3cda..42f55a034cc 100644 --- a/tokio/src/task/join_set.rs +++ b/tokio/src/task/join_set.rs @@ -81,6 +81,7 @@ impl JoinSet { /// This method panics if called outside of a Tokio runtime. /// /// [`AbortHandle`]: crate::task::AbortHandle + #[track_caller] pub fn spawn(&mut self, task: F) -> AbortHandle where F: Future, @@ -95,6 +96,7 @@ impl JoinSet { /// cancel the task. /// /// [`AbortHandle`]: crate::task::AbortHandle + #[track_caller] pub fn spawn_on(&mut self, task: F, handle: &Handle) -> AbortHandle where F: Future, @@ -114,6 +116,7 @@ impl JoinSet { /// /// [`LocalSet`]: crate::task::LocalSet /// [`AbortHandle`]: crate::task::AbortHandle + #[track_caller] pub fn spawn_local(&mut self, task: F) -> AbortHandle where F: Future, @@ -128,6 +131,7 @@ impl JoinSet { /// /// [`LocalSet`]: crate::task::LocalSet /// [`AbortHandle`]: crate::task::AbortHandle + #[track_caller] pub fn spawn_local_on(&mut self, task: F, local_set: &LocalSet) -> AbortHandle where F: Future,