-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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: update stream.md #9468
doc: update stream.md #9468
Conversation
stream.md is updated to explain the return value of writable.write(chunk) precisely. Fixes: #9247
The return value is `true` if the internal buffer does not exceed | ||
`highWaterMark` configured when the stream was created after admitting | ||
`chunk`. If false is returned, further attempts to write data to the stream | ||
should be paused until the [`'drain'`][] event is emitted. However, the |
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.
suggest: "should be paused" -> "should stop"
I find the use of the word paused confusing, because there is a stream.pause()
method, but calling it is not the "paused" referred to in the documentation.
should be paused until the [`'drain'`][] event is emitted. | ||
The return value is `true` if the internal buffer does not exceed | ||
`highWaterMark` configured when the stream was created after admitting | ||
`chunk`. If false is returned, further attempts to write data to the stream |
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.
false -> false
stream.md is updated to explain the return value of writable.write(chunk) precisely. Fixes: #9247
@sam-github @cjihrig please check, thanks for the feedback :) |
`chunk`. If `false` is returned, further attempts to write data to the stream | ||
should stop until the [`'drain'`][] event is emitted. However, the | ||
`false` return value is only advisory and the writable stream will | ||
unconditionally accept `chunk` even if it has not not been allowed to drain. |
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.
suggestion: accept -> accept and buffer
stream.md is updated to explain the return value of writable.write(chunk) precisely. Fixes: #9247
@ronkorving please check now, thanks! |
ping @ronkorving. |
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.
“internal buffer does not exceed highWaterMark
” needs to convey the meaning “internal buffer is smaller than highWaterMark
”.
Apologies, my GitHub notifications are starting to look like my inbox. LGTM! |
Thanks! Landed with wrapping and commit message fixed in f347dad. |
Checklist
Affected core subsystem(s)
doc
Description of change
stream.md is updated to explain the return value of
writable.write(chunk) precisely.
Fixes: #9247