Skip to main content

stop_requested

Function stop_requested 

Source
pub fn stop_requested() -> bool
Expand description

Returns true once a stop has been requested for the current execution. Cheap relaxed atomic load — safe to call from a hot fiber loop.

SRD-88: a fiber running inside an ExecutionContext stops when EITHER the process-global session stop (Ctrl-C, which halts every execution) OR its own per-execution stop flag is set — so a stop scoped to one execution isolates to that execution while Ctrl-C still stops all. Outside any execution scope (single-run / CLI / tests) only the global flag applies — behavior is identical to before the seam (axiom A1).