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

stream: async iterator stop read if destroyed #35640

Conversation

ronag
Copy link
Member

@ronag ronag commented Oct 14, 2020

Fixes some compatibility issues where it is expected
that for await stops reading when the stream is
destroyed.

Refs: #34887

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

Fixes some compatibility issues where it is expected
that for await stops reading when the stream is
destroyed.

Refs: nodejs#34887
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/streams

@ronag ronag added stream Issues and PRs related to the stream subsystem. request-ci Add this label to start a Jenkins CI on a PR. labels Oct 14, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 14, 2020
@nodejs-github-bot
Copy link
Collaborator

@ronag ronag requested review from mcollina and lpinca October 14, 2020 13:14
@@ -43,8 +43,6 @@ async function tests() {
});

const iter = Readable.prototype[Symbol.asyncIterator].call(stream);
await iter.next();
await iter.next();
Copy link
Member Author

Choose a reason for hiding this comment

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

This test was modified in the original PR, this PR helps bring it back to what it was.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@ronag ronag added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Oct 14, 2020
@MylesBorins
Copy link
Contributor

We are looking at landing a backport on 14.x that includes this change. Can we please fast track this so we can keep 14.x and master in sync

@MylesBorins MylesBorins added the fast-track PRs that do not need to wait for 48 hours to land. label Oct 15, 2020
@mcollina
Copy link
Member

+1 to fast track

@MylesBorins
Copy link
Contributor

MylesBorins commented Oct 15, 2020

test-asan continues to fail here

GREEEEEEEN

@MylesBorins
Copy link
Contributor

Landed in 1d8ecd8

MylesBorins pushed a commit that referenced this pull request Oct 15, 2020
Fixes some compatibility issues where it is expected
that for await stops reading when the stream is
destroyed.

Refs: #34887

PR-URL: #35640
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Oct 15, 2020
includes:

* stream: simpler and faster Readable async iterator
* stream: don't destroy on async iterator success
* stream: async iterator stop read if destroyed

PR-URL: #34887
Refs: #34035
Refs: #35122
Refs: #35640
Refs: #34680
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Matteo Collina <[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. fast-track PRs that do not need to wait for 48 hours to land. stream Issues and PRs related to the stream subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants