Skip to main content

quiesce

Function quiesce 

Source
pub async fn quiesce()
Available on stageleft_runtime and crate feature sim only.
Expand description

Runs the simulation to quiescence, as an explicit phase barrier between rounds of a multi-phase test.

All pending nondeterministic work (ticks / observations) is forced to run until no more progress is possible without new input. This deliberately narrows the explored executions: inputs sent after the barrier will never interleave with work from before it, modeling scenarios where new stimuli (such as timer ticks) arrive long after the system settles. Pair such tests with a separate barrier-free test if interleaved executions should also be explored.

Because the barrier is explicit, observations after it are intended to see the fully settled state, so — unlike SimReceiver::try_next / SimReceiver::collect forcing quiescence implicitly — it does not restrict what the test may do afterwards: receives after the barrier observe only buffered output (plus whatever later input produces), and failures cannot be misattributed across it.