Skip to main content

block_on

Function block_on 

Source
pub fn block_on<F: IntoFuture>(f: F) -> F::Output
Expand description

Blocks the current task until the given future is resolved or the task is interrupted by a signal.

When the task’s interrupted flag is set (by task.interrupt(), typically from signal delivery), this function yields the CPU to allow signal processing on the return-to-userspace path. The future will be re-polled after the yield.