spawn_traced_named

Function spawn_traced_named 

Source
pub fn spawn_traced_named<S, F, T>(name: S, f: F) -> JoinHandle<T>
where S: Into<String>, F: Future<Output = T> + Send + 'static, T: Send + 'static,
Expand description

Spawns a new named asynchronous task, returning a JoinHandle for it.

This function is a thin wrapper over tokio::spawn, and provides implicit “tracing” for spawned futures by ensuring that the task is attached to the current tracing span and the current allocation component.