Skip to main content

until_stalled

Function until_stalled 

Source
pub fn until_stalled() -> YieldNow 
Expand description

Driver-only: resume after every currently-runnable task has been polled to Pending or completion.

Awaited by the orchestrator’s step loops between sim.step() calls. Mechanically identical to yield_now, but because Executor::block_on only re-polls the driver after a full run_until_stalled drain, awaiting this from the driver guarantees the “all runnable tasks ran” contract that the old tokio-FIFO yield_now dance only approximated.

§Panics

Panics when called from inside a task (all builds): a task awaiting “drain until nothing is runnable” would silently degrade to plain yield_now semantics, resuming mid-drain while believing every runnable task quiesced. That contract violation must not survive only in release. Tasks yield with yield_now.