Skip to main content

spawn

Function spawn 

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

Spawn a future onto the current thread’s executor.

Works in both single-threaded (block_on_with_spawn) and multi-threaded (block_on_multi) contexts. Panics if called outside both.