interrupt goes first
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -168,7 +168,7 @@ Key tests:
|
||||
|
||||
## Slice 6: Interrupt Quiescence
|
||||
|
||||
Implement after async execution exists.
|
||||
Implemented after async execution exists.
|
||||
|
||||
Scope:
|
||||
|
||||
@@ -177,6 +177,10 @@ Scope:
|
||||
- Already-started async node calls drain to pending results.
|
||||
- The caller gets control only at a quiescent point.
|
||||
- Pending results do not commit until resume/commit policy allows it.
|
||||
- Item frames that route into an `InterruptNode` are prioritized before the
|
||||
parent foreach can refill capacity.
|
||||
- Already-started async handler calls drain at the batch boundary; state
|
||||
finalization remains sequential.
|
||||
|
||||
Files likely touched:
|
||||
|
||||
@@ -188,7 +192,7 @@ Files likely touched:
|
||||
|
||||
Key tests:
|
||||
|
||||
- `test_concurrent_foreach_interrupt_returns_after_quiescence`
|
||||
- `test_concurrent_foreach_interrupt_returns_before_refill`
|
||||
- `test_resume_prioritizes_interrupted_item_frame_before_siblings`
|
||||
|
||||
## Execution Order
|
||||
|
||||
Reference in New Issue
Block a user