[][src]Function tokio_global::single::block_on

pub fn block_on<F: Future>(future: F) -> Result<F::Item, F::Error>

Run a future to completion on the Tokio runtime.

This runs the given future on the runtime, blocking until it is complete, and yielding its resolved result. Any tasks or timers which the future spawns internally will be executed on the runtime.

Note

It must not be used from within async context