cancel
Client-initiated cancellation (notifications/cancelled). Completes the future now, not next tick, with whatever the eval had printed, tagged (cancelled) and marked isError. Idempotent; a no-op if the eval already finished.
Three mechanisms stop the eval, and kill uses the same three:
completing future — the compile polls it (start): one still waiting its turn never starts, and one under way stops before its next phase. Polled, not interrupted:
PlainEngine.compilesays why.dead = true— observed at the next pumpStep entry. Enough for the heartbeat lanes and for a cross-tick iterator between elements.an interrupt, sent by ParallelLane when future completes — its worker can be blocked inside a single long step (I/O, sleep, park) whose
pumpStepboundary never arrives; interrupt unblocks it. Heartbeat lanes send none: their tick thread must never be interrupted.deadis set before the interrupt, so the woken worker sees a dead task and unwinds. Not a hard kill: a step that swallows the interrupt or spins without ever blocking can't be stopped — the JVM offers no safe forcible stop.
None of them runs the body's cleanup: that is unwind, the driver's to call on its own thread.