-
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: stream becomes paused after unpipe. #5156
Conversation
LGTM |
Please wrap the lines at 80 chars. |
@nodejs/documentation ... can we please get some additional review on this one? |
LGTM pending wrapping at 80 chars |
did it |
7da4fd4
to
c7066fb
Compare
This method returns whether or not the `readable` has been **explicitly** | ||
paused by client code (using [`stream.pause()`][stream-pause] without a | ||
corresponding [`stream.resume()`][stream-resume]). | ||
This method returns whether or not the `readable` has been paused |
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.
nit: Trailing whitespace.
LGTM with a nit. @iliakan It would be cool if you could rebase this, and ideally pick a commit message more with more resemblance to the PR title here. We can do that for you on landing if you prefer, though. Also, these edits appears to have been made from the Github editor and have an |
This would also fix #4812, I think. |
Actually, there are 3 state of the stream right now.
|
I think it would be awesome if you could update this PR with that information? And probably good to ping @nodejs/streams |
|
||
* If there are no pipe destinations, by calling the | ||
[`stream.pause()`][stream-pause] method. | ||
* If there are pipe destinations, by removing any [`'data'`][] event |
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.
all 'data'
event handlers? Please check.
@iliakan I think the states are 3, but not the one you said:
According to:
|
This looks like it stalled awfully close to being land-able. @iliakan: Any chance you can rebase against master and pick this up again? (Or did this information end up in the docs already via a different pull request?) |
The doc was rewritten since then, maybe it still needs adjusting. Because we have (citing): "The Readable can switch back to paused mode using one of the following:... If there are pipe destinations, by removing any 'data' event handlers These statements contradict to each other, what you think? It's really unclear what's going on. |
Re-pinging @nodejs/streams for comment. |
The two full sentences are:
and
If a stream is flowing, there are three situations: a. there is a To pause a stream: a. call We probably need to add some unit tests to cover all this cases anyway, if they are missing. |
@jasnell it's stalled. Maybe someone else should take over. |
Fixed the docs.
isPaused
does not require explicitpause
call in fact.