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

@mcollina mcollina 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

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

Fixes: nodejs#20503
@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Jan 7, 2019
@mcollina mcollina requested a review from addaleax January 7, 2019 14:50
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will be emitted again?

lpinca and others added 3 commits January 9, 2019 12:53
@mcollina
Copy link
Member Author

mcollina commented Jan 9, 2019

@mcollina
Copy link
Member Author

mcollina commented Jan 9, 2019

cc @lpinca

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 10, 2019
@mcollina
Copy link
Member Author

Landed in 2d2f82c

@mcollina mcollina closed this Jan 10, 2019
@mcollina mcollina deleted the fix-readable-docs branch January 10, 2019 10:20
mcollina added a commit that referenced this pull request Jan 10, 2019
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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
addaleax pushed a commit that referenced this pull request Jan 14, 2019
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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
@BridgeAR BridgeAR mentioned this pull request Jan 16, 2019
BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Jan 16, 2019
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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Jan 24, 2019
BethGriggs pushed a commit that referenced this pull request Apr 28, 2019
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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
@BethGriggs BethGriggs mentioned this pull request May 1, 2019
BethGriggs pushed a commit that referenced this pull request May 10, 2019
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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
MylesBorins pushed a commit that referenced this pull request May 16, 2019
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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants