Repository navigation
Let ready IO yield to other runnable computations - #1723
Merged
Lorenzobattistela merged 4 commits intoOct 19, 2026
Merged
Lorenzobattistela merged 4 commits into
Lorenzobattistela merged 4 commits into
Conversation
Ready effects now yield every 64 steps, so a loop of IO.now reads no longer holds the event loop. The sender's 1 ms timer fired mid-hold and the test deadlocked on every lane. A single 20 ms foreign effect holds the loop within one turn, so both timers are still overdue together. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Lorenzobattistela
approved these changes
Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1719.
A parent could keep issuing ready effects forever without giving its spawned child a turn. Bound a turn to 64 ready effects on C and JS; this does not preempt pure code or cancel losing computations.
Removed the JS queue optimizations following #1644, so #1720 is not addressed here. Runnable arrays and channel queues keep their reference implementation; the requeued runnable record is reused. GUIDE.md is unchanged.
tests/io/chan_try_late.bendheld the loop with a run ofIO.nowreads, which now yields; it holds the loop with one blocking 20 ms foreign effect instead (.c/.jstwins), so both timers are still overdue together.The deterministic progress test prints
73on Bun and native C. The earlier before/after timeout reproducers remain in #1719.