Skip to main content

block_on

Function block_on 

Source
pub fn block_on<F: Future>(fut: F) -> F::Output
Expand description

Run fut to completion on a fresh executor, with no simulator.

Each round polls the future once and then drains the run queue, so a future waiting on an Event makes progress as soon as a spawned task sets it. Panics if the future is still pending after 10,000 rounds.