-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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: make it more exact #18375
doc: make it more exact #18375
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -580,9 +580,8 @@ The Readable can switch back to paused mode using one of the following: | |
|
||
* If there are no pipe destinations, by calling the | ||
[`stream.pause()`][stream-pause] method. | ||
* If there are pipe destinations, by removing any [`'data'`][] event | ||
handlers, and removing all pipe destinations by calling the | ||
[`stream.unpipe()`][] method. | ||
* If there are pipe destinations, by removing all pipe destinations by | ||
calling the [`stream.unpipe()`][] method. | ||
|
||
The important concept to remember is that a Readable will not generate data | ||
until a mechanism for either consuming or ignoring that data is provided. If | ||
|
@@ -1459,9 +1458,10 @@ write succeeded. | |
|
||
All calls to `writable.write()` that occur between the time `writable._write()` | ||
is called and the `callback` is called will cause the written data to be | ||
buffered. Once the `callback` is invoked, the stream will emit a [`'drain'`][] | ||
event. If a stream implementation is capable of processing multiple chunks of | ||
data at once, the `writable._writev()` method should be implemented. | ||
buffered. When the `callback` is invoked, the stream maybe will emit a | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Emitting a 'drain' event need to meet more conditions. See the source code of writable stream. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed. |
||
[`'drain'`][] event. If a stream implementation is capable of processing | ||
multiple chunks of data at once, the `writable._writev()` method should be | ||
implemented. | ||
|
||
If the `decodeStrings` property is set in the constructor options, then | ||
`chunk` may be a string rather than a Buffer, and `encoding` will | ||
|
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.
only calling
unpipe()
will make stream to paused mode. see the following example.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.
quick grammar nit on this:
by removing all pipe destinations by ...
the sentence should be something like: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.
fixed.