-
Notifications
You must be signed in to change notification settings - Fork 164
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
pipeTo() pulls the source even when the dest is not yet writable #153
Comments
The intention is that you only That said I haven't read through and processed #146 yet so maybe there is something more subtle I am missing. |
Ah, sorry. I meant calling In the first place, we should think of a problem whether we should call |
Oh, I see. So it seems like it is better now than it was before, because now it is consistent. But I agree there is a larger issue. For pipeTo, it seems like calling wait() asap is probably good. Because, it is good to have the data ready, possibly before the stream becomes writable: it is good to do the "pull data" and "wait for writable" in parallel. But more generally, I am not sure about automatically scheduling a pull when the queue becomes empty. I would think we would do that only if the HWM was non-zero (or more generally, if needsMore() returns true). Does that make sense, and does it seem like the right performance tradeoff? |
Agreed!
For the current spec, I agree that In the new API proposal (addition of some new methods for precise flow control information exchanging) I'm writing, I want to notify the underlying source of any change of amount queued in |
Prototyped |
Links to remaining issues (the pull request got closed as I cleaned up the branch...). |
Agreed! wait() no longer has side-effect. Condition about pull() invocation has been also fixed.
Yes! |
Forked from #146
aedbf18 changed
pipeTo()
to callwait()
even when the dest is not yet in"writable"
state. If this is unexpected, we can change the argument of thePromise.race()
call forsource
:"waiting"
&&dest
:"waiting"
tosource.closed
to watch only"closed"
and"errored"
event.Maybe need to wait for conclusion on #146.
The text was updated successfully, but these errors were encountered: