From 61709ce83536e99e32bf8262f110d026d3c19c49 Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Fri, 11 Jan 2019 12:53:37 +0100 Subject: [PATCH] doc: revert incorrect change on readable._read https://github.com/nodejs/node/pull/17979 introduced a change in the doc that was not correct about _read always being called asynchronously. This does not hold true when it is in flowing mode. See: https://github.com/nodejs/node/pull/17979 Fixes: https://github.com/nodejs/node/issues/24919 --- doc/api/stream.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index b8b456f043d361..8726a4416b7be3 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1846,10 +1846,6 @@ const myReadable = new Readable({ #### readable.\_read(size) * `size` {number} Number of bytes to read asynchronously @@ -1869,9 +1865,7 @@ when `_read()` is called again after it has stopped should it resume pushing additional data onto the queue. Once the `readable._read()` method has been called, it will not be called again -until the [`readable.push()`][stream-push] method is called. `readable._read()` -is guaranteed to be called only once within a synchronous execution, i.e. a -microtick. +until the [`readable.push()`][stream-push] method is called. The `size` argument is advisory. For implementations where a "read" is a single operation that returns data can use the `size` argument to determine how