block_on

Function block_on 

Source
pub fn block_on<T, F>(future: F) -> <F as Future>::Output
where T: Send + 'static, F: Future<Output = T> + Send + 'static,
Available on crate feature executor only.
Expand description

Blocks current thread and runs given future until completion.

All task will be cancelled after return.

Uses spawn to spawn assistant tasks.