Streams: test whether pipe stop pulling on abort#32399
Draft
MattiasBuelens wants to merge 4 commits into
Draft
Conversation
3 tasks
Member
Is it dropped? Or is it just sent to the destination over-aggressively? |
Contributor
Author
|
Oops, you're right. 😅 I was initially testing with erroring the writable stream to stop the pipe, but in the end I went with aborting it using a signal instead. I think it's possible to trigger something similar with an errored writable stream, but I think we can solve that with your suggestion in whatwg/streams#1207 (comment) to synchronously check the destination's state. |
MattiasBuelens
force-pushed
the
rs-pipe-stop-pulling-on-abort
branch
from
May 17, 2026 20:01
1646d65 to
6f27b30
Compare
MattiasBuelens
force-pushed
the
rs-pipe-stop-pulling-on-abort
branch
from
May 25, 2026 20:38
75a8e1a to
6f27b30
Compare
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.
See whatwg/streams#1208 for the accompanying spec change.
These tests demonstrates one way how
pipeTo()caninadvertently drop a chunkcontinue reading for too long.'a'in its queue.highWaterMark = Infinity, sowriter.readyis always resolved.preventCancel = trueand a givenAbortSignal.AbortSignal.'b'.'a') completes.Expected behavior:
'a'.'b'.Actual behavior:
'a'and'b'.