spawn_local

Function spawn_local 

Source
pub fn spawn_local<F, S>(
    future: F,
    scheduler: S,
) -> (Runnable, AsyncTask<F::Output>)
where F: Future + 'static, S: Fn(Runnable) + Send + Sync + 'static,
Available on crate feature async-task only.
Expand description

Spawn a local (non-Send) future with a custom scheduler using async_task.

This is similar to spawn but works with futures that are not Send. It uses async_task::spawn_local internally.

This function is only available when the std feature is enabled.