futures_executor

Function block_on

Source
pub fn block_on<F: Future>(f: F) -> Result<F::Item, F::Error>
Expand description

Run a future to completion on the current thread.

This function will block the caller until the given future has completed. The default executor for the future is a global ThreadPool.

Use a LocalPool if you need finer-grained control over spawned tasks.