track tokio task spawn caller

This commit is contained in:
soruh 2023-03-18 17:48:11 +01:00
parent 91e26d9ad0
commit 6b698ae869

View File

@ -93,7 +93,7 @@ impl Config {
} }
#[cfg(not(feature = "tokio_console"))] #[cfg(not(feature = "tokio_console"))]
#[track_caller]
fn spawn<T: Send + 'static>( fn spawn<T: Send + 'static>(
_name: &str, _name: &str,
future: impl Future<Output = T> + Send + 'static, future: impl Future<Output = T> + Send + 'static,
@ -102,6 +102,7 @@ fn spawn<T: Send + 'static>(
} }
#[cfg(feature = "tokio_console")] #[cfg(feature = "tokio_console")]
#[track_caller]
fn spawn<T: Send + 'static>( fn spawn<T: Send + 'static>(
name: &str, name: &str,
future: impl Future<Output = T> + Send + 'static, future: impl Future<Output = T> + Send + 'static,