Skip to content
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 sure that calls to .read() are looped #25375

Closed
wants to merge 4 commits into from

Conversation

@mcollina
Copy link
Member

commented Jan 7, 2019

The 'readable' event assumes that calls to readable.read() happens
within that event handler until readable.read() returns null.

Fixes: #20503

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines
doc: make sure that calls to .read() are looped
The 'readable' event assumes that calls to readable.read() happens
within that event handler until readable.read() returns null.

Fixes: #20503

@mcollina mcollina requested a review from addaleax Jan 7, 2019

@cjihrig
cjihrig approved these changes Jan 7, 2019
doc/api/crypto.md Outdated Show resolved Hide resolved
doc/api/crypto.md Outdated Show resolved Hide resolved
doc/api/stream.md Outdated Show resolved Hide resolved
@@ -1012,6 +1012,10 @@ readable.on('readable', () => {
});
```

Note that the `while` loop is necessary when processing data with
`readable.read()`. Only after `readable.read()` returns null,
[`'readable'`]() will be emitted.

This comment has been minimized.

Copy link
@lpinca

lpinca Jan 7, 2019

Member

will be emitted again?

lpinca and others added 3 commits Jan 9, 2019
Update doc/api/crypto.md
Co-Authored-By: mcollina <matteo.collina@gmail.com>
Update doc/api/crypto.md
Co-Authored-By: mcollina <matteo.collina@gmail.com>
Update doc/api/stream.md
Co-Authored-By: mcollina <matteo.collina@gmail.com>
@mcollina

This comment has been minimized.

@mcollina

This comment has been minimized.

Copy link
Member Author

commented Jan 9, 2019

cc @lpinca

@jasnell
jasnell approved these changes Jan 9, 2019
@lpinca
lpinca approved these changes Jan 9, 2019
@mcollina

This comment has been minimized.

Copy link
Member Author

commented Jan 10, 2019

Landed in 2d2f82c

@mcollina mcollina closed this Jan 10, 2019

@mcollina mcollina deleted the mcollina:fix-readable-docs branch Jan 10, 2019

mcollina added a commit that referenced this pull request Jan 10, 2019
doc: make sure that calls to .read() are looped
The 'readable' event assumes that calls to readable.read() happens
within that event handler until readable.read() returns null.

Fixes: #20503
PR-URL: #25375
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
addaleax added a commit that referenced this pull request Jan 14, 2019
doc: make sure that calls to .read() are looped
The 'readable' event assumes that calls to readable.read() happens
within that event handler until readable.read() returns null.

Fixes: #20503
PR-URL: #25375
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@BridgeAR BridgeAR referenced this pull request Jan 16, 2019
BridgeAR added a commit to BridgeAR/node that referenced this pull request Jan 16, 2019
doc: make sure that calls to .read() are looped
The 'readable' event assumes that calls to readable.read() happens
within that event handler until readable.read() returns null.

Fixes: nodejs#20503
PR-URL: nodejs#25375
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@MylesBorins MylesBorins referenced this pull request Jan 24, 2019
BethGriggs added a commit that referenced this pull request Apr 28, 2019
doc: make sure that calls to .read() are looped
The 'readable' event assumes that calls to readable.read() happens
within that event handler until readable.read() returns null.

Fixes: #20503
PR-URL: #25375
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@BethGriggs BethGriggs referenced this pull request May 1, 2019
BethGriggs added a commit that referenced this pull request May 10, 2019
doc: make sure that calls to .read() are looped
The 'readable' event assumes that calls to readable.read() happens
within that event handler until readable.read() returns null.

Fixes: #20503
PR-URL: #25375
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins added a commit that referenced this pull request May 16, 2019
doc: make sure that calls to .read() are looped
The 'readable' event assumes that calls to readable.read() happens
within that event handler until readable.read() returns null.

Fixes: #20503
PR-URL: #25375
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.