summaryrefslogtreecommitdiffstats
path: root/tokio/src/task
diff options
context:
space:
mode:
Diffstat (limited to 'tokio/src/task')
-rw-r--r--tokio/src/task/blocking.rs1
-rw-r--r--tokio/src/task/local.rs2
-rw-r--r--tokio/src/task/spawn.rs1
3 files changed, 4 insertions, 0 deletions
diff --git a/tokio/src/task/blocking.rs b/tokio/src/task/blocking.rs
index fc6632be..36bc4579 100644
--- a/tokio/src/task/blocking.rs
+++ b/tokio/src/task/blocking.rs
@@ -104,6 +104,7 @@ cfg_rt_multi_thread! {
/// # Ok(())
/// # }
/// ```
+#[cfg_attr(tokio_track_caller, track_caller)]
pub fn spawn_blocking<F, R>(f: F) -> JoinHandle<R>
where
F: FnOnce() -> R + Send + 'static,
diff --git a/tokio/src/task/local.rs b/tokio/src/task/local.rs
index 5896126c..566b2f2d 100644
--- a/tokio/src/task/local.rs
+++ b/tokio/src/task/local.rs
@@ -190,6 +190,7 @@ cfg_rt! {
/// }).await;
/// }
/// ```
+ #[cfg_attr(tokio_track_caller, track_caller)]
pub fn spawn_local<F>(future: F) -> JoinHandle<F::Output>
where
F: Future + 'static,
@@ -273,6 +274,7 @@ impl LocalSet {
/// }
/// ```
/// [`spawn_local`]: fn@spawn_local
+ #[cfg_attr(tokio_track_caller, track_caller)]
pub fn spawn_local<F>(&self, future: F) -> JoinHandle<F::Output>
where
F: Future + 'static,
diff --git a/tokio/src/task/spawn.rs b/tokio/src/task/spawn.rs
index 77acb579..a060852d 100644
--- a/tokio/src/task/spawn.rs
+++ b/tokio/src/task/spawn.rs
@@ -122,6 +122,7 @@ cfg_rt! {
/// ```text
/// error[E0391]: cycle detected when processing `main`
/// ```
+ #[cfg_attr(tokio_track_caller, track_caller)]
pub fn spawn<T>(task: T) -> JoinHandle<T::Output>
where
T: Future + Send + 'static,