-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: add AbortSignal support to promisified pipeline #37359
Conversation
54d0ed7
to
0100a60
Compare
@benjamingr: Isn't the usual pattern to send an options object i.e. |
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.
needs docs?
Yeah I tend to prefer options with a signal too |
add support for AbortSignal to promisified pipeline. Resolves: nodejs#37321
0100a60
to
dc74b35
Compare
I've updated the docs, and also changed it to receive an @ronag I could also "push" the changes from the promise version, into the regular pipeline implementation, so that both the "regular" pipeline and promisified pipeline support cancellation. where the API will change to: Similarly to what was done in |
Landed in 38f6e5a 🎉 |
add support for AbortSignal to promisified pipeline. Resolves: #37321 PR-URL: #37359 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Zijian Liu <[email protected]>
add support for AbortSignal to promisified pipeline. Resolves: #37321 PR-URL: #37359 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Zijian Liu <[email protected]>
This PR adds support for AbortSignal to promisified pipeline (in
stream/promises
)This resolves #37321.
As an aside, this wouldn't be hard to actually push it into pipeline itself and support it in the regular version, however it's already pretty simple to just call
addAbortSignal
fromstream
on the received pipeline.make -j4 test
(UNIX), orvcbuild test
(Windows) passes