interrupt goes first

This commit is contained in:
lda
2026-05-22 21:40:53 +07:00 Verified
parent 6802593d2a
commit 6c1c8abc52
5 changed files with 169 additions and 4 deletions
@@ -131,7 +131,7 @@ future explicit deep merge policy exists.
## Interrupt and Failure Quiescence
Future concurrent execution should not assume in-flight node calls can be safely
Concurrent execution should not assume in-flight node calls can be safely
cancelled.
If an interrupt or fail policy trips while sibling jobs are already started, the
@@ -146,6 +146,14 @@ runtime should:
For `fail`, drained sibling results are for observability/cleanup only and
should not commit normal state progress after the failure boundary.
Current async concurrent foreach implements the interrupt part of this by
prioritizing item frames that route into an `InterruptNode`. If a batched async
node result sends one item to an interrupt while a sibling completes, the
interrupt-bound frame is placed at the front of the ready queue before the
parent foreach can refill capacity. Already-started async handler calls from
the batch are awaited first, then their results are finalized sequentially.
The foreach barrier does not commit while an item frame remains interrupted.
## Capacity and Runtime Limits
Foreach capacity is local correctness policy, not total process protection.