Skip to main content

block_on

Function block_on 

Source
pub fn block_on<F>(future: F) -> F::Output
where F: Future,
Expand description

Block the current thread until future resolves.

This is the Moirai-owned synchronous wait primitive for code that only needs to bridge an async operation into a synchronous boundary. It uses the same parking waker as moirai_core::executor::ExecutorControl::block_on without constructing or touching the process-wide scheduler.