-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
streams documentation for writable.write(chunk) describes return value incorrectly #9247
Comments
I was thinking about how
when, in reality, (and more sensibly with how streams should work):
The associated PR needs to be updated accordingly. I’m basing this on my reading of Line 305 in 9b0f53d
|
Fix the explanation which stated that write() would return false if highWaterMark is exceeded to correctly state that false is returned once highWaterMark is reached. See nodejs#9247.
Fix the explanation which stated that write() would return false if highWaterMark is exceeded to correctly state that false is returned once highWaterMark is reached. See nodejs#9247. PR-URL: nodejs#10582 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Fix the explanation which stated that write() would return false if highWaterMark is exceeded to correctly state that false is returned once highWaterMark is reached. See nodejs#9247. PR-URL: nodejs#10582 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Fix the explanation which stated that write() would return false if highWaterMark is exceeded to correctly state that false is returned once highWaterMark is reached. See nodejs#9247. PR-URL: nodejs#10582 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Fix the explanation which stated that write() would return false if highWaterMark is exceeded to correctly state that false is returned once highWaterMark is reached. See nodejs#9247. PR-URL: nodejs#10582 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This suggests that when
writable.write(chunk)
returnsfalse
, the passedchunk
was not buffered. In reality,write()
always unconditionally buffers thechunk
regardless of what it returns. Its return value is only advisory.I would suggest language like this
The text was updated successfully, but these errors were encountered: