stream: refine stream/iter backpressure and error handling#63697
Open
jasnell wants to merge 2 commits into
Open
stream: refine stream/iter backpressure and error handling#63697jasnell wants to merge 2 commits into
jasnell wants to merge 2 commits into
Conversation
Member
jasnell
commented
Jun 1, 2026
- Improve the backpressure implementation alignment with the spec.
- Improve error handling in a couple cases.
Collaborator
|
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #63697 +/- ##
==========================================
- Coverage 91.96% 90.35% -1.62%
==========================================
Files 379 732 +353
Lines 166659 236588 +69929
Branches 25502 44567 +19065
==========================================
+ Hits 153270 213763 +60493
- Misses 13100 14544 +1444
- Partials 289 8281 +7992
🚀 New features to boost your workflow:
|
trivikr
requested changes
Jun 2, 2026
trivikr
reviewed
Jun 2, 2026
In `Writer`, there are two queues that matter: the slot queue and the pending queue. The sync `writeSync`/`writevSync` only use the slot queue. If writes cannot be accepted directly into slots, they return `false`. The sync methods *never* enqueue into the pending queue. The async `write`/`writev` will first attempt to add to the slot queue; if it is full, then it will attempt to add to the pending queue; if that is also full, the backpressure policy kicks in. Signed-off-by: James M Snell <jasnell@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com>
bea41b1 to
28142cd
Compare
trivikr
approved these changes
Jun 2, 2026
Collaborator
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.