Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f6964dc

Browse filesBrowse files
sploders101targos
authored andcommitted
doc: clarify when readable._read(...) is called
Fixes: #38586 PR-URL: #38726 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com>
1 parent 3481b02 commit f6964dc
Copy full SHA for f6964dc

File tree

Expand file treeCollapse file tree

1 file changed

+6
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-4
lines changed
Open diff view settings
Collapse file

‎doc/api/stream.md‎

Copy file name to clipboardExpand all lines: doc/api/stream.md
+6-4Lines changed: 6 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2564,10 +2564,12 @@ All `Readable` stream implementations must provide an implementation of the
25642564

25652565
When [`readable._read()`][] is called, if data is available from the resource,
25662566
the implementation should begin pushing that data into the read queue using the
2567-
[`this.push(dataChunk)`][stream-push] method. `_read()` should continue reading
2568-
from the resource and pushing data until `readable.push()` returns `false`. Only
2569-
when `_read()` is called again after it has stopped should it resume pushing
2570-
additional data onto the queue.
2567+
[`this.push(dataChunk)`][stream-push] method. `_read()` will be called again
2568+
after each call to [`this.push(dataChunk)`][stream-push] once the stream is
2569+
ready to accept more data. `_read()` may continue reading from the resource and
2570+
pushing data until `readable.push()` returns `false`. Only when `_read()` is
2571+
called again after it has stopped should it resume pushing additional data into
2572+
the queue.
25712573

25722574
Once the [`readable._read()`][] method has been called, it will not be called
25732575
again until more data is pushed through the [`readable.push()`][stream-push]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.