spawn_traced

Function spawn_traced 

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

Spawns a new 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.