Function cros_async::block_on

source ·
pub fn block_on<F: Future>(f: F) -> F::Output
Expand description

Run a future to completion on the current thread.

This method will block the current thread until f completes. Useful when you need to call an async fn from a non-async context.