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: always delay construct callback by a nextTick #46818

Merged
merged 3 commits into from
Feb 26, 2023

Conversation

mcollina
Copy link
Member

Fixes: #46765

@mcollina mcollina requested a review from ronag February 24, 2023 15:48
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/streams

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Feb 24, 2023
@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 24, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 24, 2023
@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@ronag ronag left a comment

Choose a reason for hiding this comment

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

LGTM, though jump is a weird name...

@mcollina
Copy link
Member Author

LGTM, though jump is a weird name...

what would you recommend?

@ronag
Copy link
Member

ronag commented Feb 24, 2023

LGTM, though jump is a weird name...

what would you recommend?

onConstructNT and onConstruct, like we usually do?

@ronag
Copy link
Member

ronag commented Feb 24, 2023

Or:

try {
  stream._construct(err => {
    process.nextTick(onConstruct, err);
  });
} catch (err) {
  process.nextTick(onConstruct, err);
}

Signed-off-by: Matteo Collina <[email protected]>
@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 24, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 24, 2023
@nodejs-github-bot
Copy link
Collaborator

@ronag ronag added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 24, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 24, 2023
@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Feb 24, 2023
@bnoordhuis
Copy link
Member

bnoordhuis commented Feb 25, 2023

Just double-checking: with this change there are now three (3) process.nextTick calls involved in a construct call: constructNT -> onConstruct -> emitConstructNT. That's intentional?

@mcollina
Copy link
Member Author

Just double-checking: with this change there are now three (3) process.nextTick calls involved in a construct call: constructNT -> onConstruct -> emitConstructNT. That's intentional?

Good spot! I was able to remove one.

@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Feb 25, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 25, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 26, 2023
@nodejs-github-bot nodejs-github-bot merged commit 355bcbc into nodejs:main Feb 26, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in 355bcbc

targos pushed a commit that referenced this pull request Mar 13, 2023
Signed-off-by: Matteo Collina <[email protected]>
Fixes: #46765
PR-URL: #46818
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
targos pushed a commit that referenced this pull request Mar 14, 2023
Signed-off-by: Matteo Collina <[email protected]>
Fixes: #46765
PR-URL: #46818
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
danielleadams pushed a commit that referenced this pull request Apr 11, 2023
Signed-off-by: Matteo Collina <[email protected]>
Fixes: #46765
PR-URL: #46818
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
kt3k added a commit to kt3k/deno that referenced this pull request Nov 22, 2023
kt3k added a commit to denoland/deno that referenced this pull request Nov 23, 2023
This change applies the same fix as
nodejs/node#46818, and the original example
given in #20456 works as expected.

closes #20456
crowlKats pushed a commit to denoland/deno that referenced this pull request Nov 24, 2023
This change applies the same fix as
nodejs/node#46818, and the original example
given in #20456 works as expected.

closes #20456

(cherry picked from commit bf42467)
bartlomieju pushed a commit to denoland/deno that referenced this pull request Nov 24, 2023
This change applies the same fix as
nodejs/node#46818, and the original example
given in #20456 works as expected.

closes #20456
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. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stream.Transform changing order of items
8 participants