Skip to main content

spawn_local

Function spawn_local 

Source
pub fn spawn_local<F>(future: F) -> Task<F::Output>
where F: Future + 'static, F::Output: 'static,
Expand description

Spawns a Future<Output = T> that executes on the current thread; returns a Task.

The future will be polled to completion in the background. Awaiting the returned task has no effect when the future is polled. Dropping the task will cancel the future, unless you call Task::detach() first.