Skip to main content

spawn

Function spawn 

Source
fn spawn<F, R>(mandatory: bool, f: F) -> Option<JoinHandle<R>>
where F: FnOnce() -> R + Send + 'static, R: Send + 'static,
Expand description

Runs f on the blocking pool.

Returns None if mandatory is set and the operation could not be spawned, normally because the runtime is shutting down.