-
Notifications
You must be signed in to change notification settings - Fork 161
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
Readable stream with ack #324
Comments
I agree it's not easy to use. The user must be aware of some contract.
Sure
|
We could also manually do the equivalent by using a stream of tuples of |
This is helpful since it illustrates that it's somewhat additive. That is, if we market it as "usually you will never get your array buffer back, but sometimes you might if the consumer is considerate and uses these extra APIs" then it seems more reasonable. Do you envision usage outside of transform scenarios, or with non-byte streams? More examples always helps :)
Hmm that's interesting, and worth keeping in mind. |
Seems the proposal at #329 (comment) (see also #329 (comment)) allows users to ignore complicated APIs ( |
An idea that keeps coming up (most recently #323, feel free to edit this post to point to other instances) is "readable stream with ack," i.e., one that not only lets you read(), but also lets you acknowledge when you're done with a chunk.
The most compelling case for this has to do with buffer re-use (e.g. #323). It also gives some symmetry with writable streams' two-signals approach (but see #316).
However, I find it basically impossible to envision author code using this correctly and consistently. @tyoshino, could you help illustrate some author code that operates like this?
The text was updated successfully, but these errors were encountered: