Skip to main content

Module steps

Module steps 

Source
Expand description

Operations on KernelState::steps.

Terminal steps are pruned rather than kept with a terminal status, so the map stays bounded on long runs; closed_steps carries the count. A later event for a pruned step therefore reports unknown_step, which is exactly the answer a late duplicate result deserves.

Functionsยง

cancel_race_loser
When a signal step or its <id>:timeout deadline timer settles, close the other side of the race as cancelled so the reducer only ever sees the winner. Timers are not tasks, so no task update is owed; the loser is pruned like any other terminal step, and a late event for it reports unknown_step.
close_open_steps
Close every open step and emit a cancelled task update for each open task, so the host releases leases instead of leaving workers running for a dead run.
close_step
Prune one step and account for it.
has_open_signal
Whether the run is parked on at least one signal.
has_open_work
Whether any open step can still produce work (task / timer / child). A deadline timer paired with an open signal step belongs to that wait, so it does not count: the run is parked on the signal, deadline or not.