-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stream: async iterator stop read if destroyed #35640
stream: async iterator stop read if destroyed #35640
Conversation
Fixes some compatibility issues where it is expected that for await stops reading when the stream is destroyed. Refs: nodejs#34887
Review requested:
|
@@ -43,8 +43,6 @@ async function tests() { | |||
}); | |||
|
|||
const iter = Readable.prototype[Symbol.asyncIterator].call(stream); | |||
await iter.next(); | |||
await iter.next(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was modified in the original PR, this PR helps bring it back to what it was.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
We are looking at landing a backport on 14.x that includes this change. Can we please fast track this so we can keep 14.x and master in sync |
+1 to fast track |
GREEEEEEEN |
Landed in 1d8ecd8 |
Fixes some compatibility issues where it is expected that for await stops reading when the stream is destroyed. Refs: #34887 PR-URL: #35640 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
includes: * stream: simpler and faster Readable async iterator * stream: don't destroy on async iterator success * stream: async iterator stop read if destroyed PR-URL: #34887 Refs: #34035 Refs: #35122 Refs: #35640 Refs: #34680 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Fixes some compatibility issues where it is expected
that for await stops reading when the stream is
destroyed.
Refs: #34887
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes