Function spawn_local
pub fn spawn_local<F>(future: F) -> JoinHandle<<F as Future>::Output> ⓘAvailable on crate features
dial9 and tokio only.Expand description
spawn without the Send bounds.
The task is spawned on the calling thread’s
LocalSet or
LocalRuntime. To target a specific
LocalSet, use spawn_local_in.
§Panics
Panics if called outside a LocalSet or LocalRuntime context (same as
[tokio::task::spawn_local]).