Function await_tree::spawn_anonymous
source · pub fn spawn_anonymous<T>(
root_span: impl Into<Span>,
future: T
) -> JoinHandle<T::Output>
Expand description
Spawns a new asynchronous task instrumented with the given root Span
, returning a
JoinHandle
for it.
The spawned task will be registered in the current Registry
anonymously, if
it exists. Otherwise, this is equivalent to tokio::spawn
.