block_on

Function block_on 

Source
pub fn block_on<T: Send + 'static, F: Future<Output = T> + Send + 'static>(
    future: F,
) -> F::Output
Expand description

Blocks current thread and runs given future until completion.

All task will be cancelled after return.

Uses spawn to spawn assistant tasks.