spawn_blocking

Function spawn_blocking 

Source
pub fn spawn_blocking<F, R>(f: F) -> BlockingResult<R> 
where F: FnOnce() -> R + Send + 'static, R: Send + 'static,
Expand description

Spawns a blocking task in a new thread, and wait for it.

The task will not be cancelled even if the future is dropped.