pub fn block_on<T, F>(fut: F) -> Twhere
F: Future<Output = T>,Expand description
Drives a future to completion on the current thread, processing I/O events when idle.
Does not support task spawning (see Executor::run).
ยงExample
use std::time::Duration;
use local_runtime::time::Timer;
local_runtime::block_on(async {
Timer::delay(Duration::from_millis(10)).await;
});