Skip to main content

spawn_local_in

Function spawn_local_in 

pub fn spawn_local_in<F>(
    set: &LocalSet,
    future: F,
) -> JoinHandle<<F as Future>::Output> ⓘ
where F: Future + 'static, <F as Future>::Output: 'static,
Available on crate features dial9 and tokio only.
Expand description

spawn_in for a [tokio::task::LocalSet]: spawn a traced !Send task onto set, from inside or outside its context.

Like LocalSet::spawn_local, but the task’s polls are instrumented when the runtime driving set is dial9-traced. Instrumentation resolves at the task’s first poll, so this never panics.