Uh oh!
There was an error while loading. Please reload this page.
stream: add AbortSignal support to finished - #37354
Conversation
aduh95
left a comment
There was a problem hiding this comment.
Can you add an entry to the changes YAML list in the docs please?
- version: REPLACEMEpr-url: https://github.com/nodejs/node/pull/37354description: The `signal` option was added.Uh oh!
There was an error while loading. Please reload this page.
b330729 to
caa5a1bCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
caa5a1b to
3ca500aComparebenjamingr
commented
Feb 14, 2021
@nodejs/streams |
mcollina
left a comment
There was a problem hiding this comment.
I'm not convinced by this change - I might expect for the stream to be destroyed on abort. What's the rationale for not doing so?
IMO However, maybe aborting should invoke the cleanup function (which it currently doesn't). |
mcollina
commented
Feb 17, 2021
If |
Yes. The way I see it pipeline has "non recoverable side effects" on the stream and should destroy while finished has no side effects and should not destroy. |
3ca500a to
e027154CompareUh oh!
There was an error while loading. Please reload this page.
44bd8c6 to
7938420Comparenodejs-github-bot
commented
Feb 18, 2021
nodejs-github-bot
commented
Feb 18, 2021
nodejs-github-bot
commented
Feb 18, 2021
Linkgoron
commented
Feb 25, 2021
Is there anything else that I need to do here to get this merged? |
nodejs-github-bot
commented
Feb 26, 2021
nodejs-github-bot
commented
Feb 26, 2021
PR-URL: nodejs#37354 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
7938420 to
7837d3fCompareaduh95
commented
Feb 26, 2021
Landed in 7837d3f |
PR-URL: #37354 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Refs: nodejs#46205 PR-URL: nodejs#46403 Refs: nodejs#37354 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com>
Add AbortSignal support to stream.finished
This PR adds support for AbortSignal in stream.finished (eos).
Originally, I thought about adding it to the
promisifiedversion only, however I think that it could be useful to both.I've implemented it so that if the stream is already closed, and the AbortSignal is also aborted, the closed gets prioritised (no error is emitted).
make -j4 test(UNIX), orvcbuild test(Windows) passes