stream: always delay construct callback by a nextTick#46818
Merged
nodejs-github-bot merged 3 commits intonodejs:mainfrom Feb 26, 2023
Merged
stream: always delay construct callback by a nextTick#46818nodejs-github-bot merged 3 commits intonodejs:mainfrom
nodejs-github-bot merged 3 commits intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
Signed-off-by: Matteo Collina <hello@matteocollina.com> Fixes: nodejs#46765
Collaborator
ronag
approved these changes
Feb 24, 2023
Member
ronag
left a comment
There was a problem hiding this comment.
LGTM, though jump is a weird name...
Member
Author
what would you recommend? |
Member
|
Member
|
Or: try {
stream._construct(err => {
process.nextTick(onConstruct, err);
});
} catch (err) {
process.nextTick(onConstruct, err);
} |
ronag
approved these changes
Feb 24, 2023
Collaborator
aduh95
reviewed
Feb 24, 2023
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
lpinca
approved these changes
Feb 24, 2023
Collaborator
jasnell
approved these changes
Feb 24, 2023
Member
|
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? |
28 tasks
Member
Author
Good spot! I was able to remove one. |
Collaborator
Collaborator
benjamingr
approved these changes
Feb 25, 2023
15 tasks
Collaborator
|
Landed in 355bcbc |
This was referenced Feb 27, 2023
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
This was referenced Mar 6, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes: #46765