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>:timeoutdeadline timer settles, close the other side of the race ascancelledso 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 reportsunknown_step. - close_
open_ steps - Close every open step and emit a
cancelledtask 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.