GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — docs: fix stream async iterator sample by ronag · Pull Request #31252 · nodejs/node

Conversation

@ronag

@ronag ronag commented Jan 7, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

The for await loop into writable could cause an unhandled exception
in the case where we are waiting for data from the async iterable and
there is no 'error' handler registered on the writable.

Fixes: #31222

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to Node.js documentation. stream Issues and PRs related to Node.js streams. labels Jan 7, 2020
@ronag
ronag force-pushed the doc-async-iterator-write branch 2 times, most recently from 701e364 to ad5e164 Compare January 7, 2020 21:44
ronag
ronag commented Jan 7, 2020
View reviewed changes
Comment thread doc/api/stream.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ronag
ronag force-pushed the doc-async-iterator-write branch 4 times, most recently from 02a4a94 to 542711c Compare January 7, 2020 21:48
@ronag
docs: fix stream async iterator sample
a778098
The for await loop into writable loop could cause an unhandled exception
in the case where we are waiting for data from the async iterable and
this no `'error'` handler is registered on the writable.

Fixes: nodejs#31222
@ronag
ronag force-pushed the doc-async-iterator-write branch from 542711c to a778098 Compare January 7, 2020 21:49
ronag added 2 commits January 7, 2020 22:59
@ronag
docs: rename iterator to iterable in examples
3fda730
@ronag
fixup! docs: fix stream async iterator sample
f1d486a
@ronag
ronag force-pushed the doc-async-iterator-write branch from cfe161a to f1d486a Compare January 7, 2020 22:01
ronag
ronag commented Jan 7, 2020
View reviewed changes
Comment thread doc/api/stream.md
// Handle backpressure on write().
if (!writable.write(chunk))
if (!writable.write(chunk)) {
if (writable.destroyed) return;

@ronag ronag Jan 7, 2020

Copy link
Copy Markdown
Member Author

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.

This writable.destroyed check is ugly but I don't see a way around it...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@BridgeAR
BridgeAR requested review from lpinca and mcollina January 9, 2020 22:00
mcollina
mcollina approved these changes Jan 9, 2020
View reviewed changes

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

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.

lgtm

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Trott
Trott approved these changes Jan 10, 2020
View reviewed changes
@Trott Trott added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Jan 10, 2020
jasnell
jasnell approved these changes Jan 10, 2020
View reviewed changes
Trott pushed a commit that referenced this pull request Jan 10, 2020
@ronag @Trott
doc: fix stream async iterator sample
1b8eb22
The for await loop into writable loop could cause an unhandled exception
in the case where we are waiting for data from the async iterable and
this no `'error'` handler is registered on the writable.

Fixes: #31222

PR-URL: #31252
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Trott pushed a commit that referenced this pull request Jan 10, 2020
@ronag @Trott
doc: rename iterator to iterable in examples
5f76f76
PR-URL: #31252
Fixes: #31222
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@Trott

Trott commented Jan 10, 2020

Copy link
Copy Markdown
Member

Landed in e468759...5f76f76.

Thanks for using --fixup on your fixup commit. Being able to use --autosquash while landing is a small-but-meaningful help!

ronag reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott Trott closed this Jan 10, 2020
MylesBorins pushed a commit that referenced this pull request Jan 16, 2020
@ronag @MylesBorins
doc: fix stream async iterator sample
d51de78
The for await loop into writable loop could cause an unhandled exception
in the case where we are waiting for data from the async iterable and
this no `'error'` handler is registered on the writable.

Fixes: #31222

PR-URL: #31252
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jan 16, 2020
@ronag @MylesBorins
doc: rename iterator to iterable in examples
0e48d8d
PR-URL: #31252
Fixes: #31222
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@codebytere codebytere mentioned this pull request Jan 16, 2020
v13.7.0 proposal #31382
Merged
codebytere pushed a commit that referenced this pull request Mar 14, 2020
@ronag @codebytere
doc: fix stream async iterator sample
6dc3c5e
The for await loop into writable loop could cause an unhandled exception
in the case where we are waiting for data from the async iterable and
this no `'error'` handler is registered on the writable.

Fixes: #31222

PR-URL: #31252
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
codebytere pushed a commit that referenced this pull request Mar 14, 2020
@ronag @codebytere
doc: rename iterator to iterable in examples
7839676
PR-URL: #31252
Fixes: #31222
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
codebytere pushed a commit that referenced this pull request Mar 17, 2020
@ronag @codebytere
doc: fix stream async iterator sample
4922184
The for await loop into writable loop could cause an unhandled exception
in the case where we are waiting for data from the async iterable and
this no `'error'` handler is registered on the writable.

Fixes: #31222

PR-URL: #31252
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
codebytere pushed a commit that referenced this pull request Mar 17, 2020
@ronag @codebytere
doc: rename iterator to iterable in examples
e398137
PR-URL: #31252
Fixes: #31222
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@codebytere codebytere mentioned this pull request Mar 17, 2020
v12.16.2 proposal #32313
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mcollina mcollina mcollina approved these changes
@jasnell jasnell jasnell approved these changes
@Trott Trott Trott approved these changes
@lpinca lpinca Awaiting requested review from lpinca

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. doc Issues and PRs related to Node.js documentation. stream Issues and PRs related to Node.js streams.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

docs: writable streams from async iterators example issue

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@ronag @Trott @mcollina @jasnell @nodejs-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.