-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
stream: cleanup use of _readableState.ended #29645
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: cleanup use of _readableState.ended #29645
Conversation
Does that mean that e.g. the |
|
I don't this so. As per the readable stream current implementation, any subsequent |
addaleax
left a comment
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 but I’d feel more comfortable if there was a test somewhere (whether it already exists or not) that makes sure that repeated .push(null) calls do not lead to errors :)
|
Yes, makes sense. I will look for one if exists or add it as part of this PR if missing. Thanks. |
|
I couldn't find an existing test verifying multiple |
mcollina
left a comment
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
PR-URL: #29645 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
PR-URL: #29645 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
|
The subsystem prefix on the second commit should have been |
PR-URL: #29645 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
PR-URL: #29645 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
PR-URL: #29645 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
PR-URL: #29645 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Replaces references to Readable stream's internal state
_readableState.endedwithreadableEnded.One thing to highlight that readable stream internally (L#216)
sets the
readableEndedproperty using_readableState.endEmittedandnot
_readableState.ended. The files changed in this PR used_readableState.endedstate.Although all existing tests pass and it seems correct to rely on the
_readableState.endEmittedto know when the stream ended, pleasesuggest if this could be a potential issue.
cc: @addaleax @mcollina
Refs: #445
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes