spawn_local

Function spawn_local 

Source
pub fn spawn_local<Fut>(
    fut: Fut,
) -> AnyLocalExecutorTask<<Fut as Future>::Output>
where Fut: Future + 'static,
Expand description

Spawn a future on the thread-local executor.

The local executor must be initialized with init_local_executor before calling this function. Unlike spawn, this can handle futures that are not Send.

ยงPanics

Panics if the local executor has not been set for this thread.