-
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
doc: piping from async generators using pipeline() #33992
Conversation
43d87e5
to
d67ecbf
Compare
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.
@nodejs/streams
Maybe this should wait for #33991? |
I think we might want to iterate on that a bit more, so if this is ready we should land. |
Thank ya'll for your feedback. I have implemented all edits which were suggested in review. Let me know if anyone has any more suggestions. |
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: #33992 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in bfc0e3f |
PR-URL: #33992 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #33992 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This will be my first contribution, so please let me know if I did something wrong. Thank you!
This PR is an attempt to implement #33644
Although the issue asked I remove the old snippet, after thinking about it more I decided to keep the manual way of handling backpressure and backpressure-related errors in the docs.
Firstly, I think there may be some use case case for having to handle this manually. Secondly, having the manual way to handle this will be useful for anyone looking to gain insight as to how things work under the hood of pipeline().
I did mention pipeline() first and its benefits (that it abstracts the backpressure handling away), so I thought it was a sufficient compromise but I can remove it if ya'll think otherwise.
Checklist