-
Notifications
You must be signed in to change notification settings - Fork 30k
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
[v9.x backport] Refactor async_hooks initTriggerId #18079
Closed
AndreasMadsen
wants to merge
3
commits into
nodejs:v9.x-staging
from
AndreasMadsen:backport-17273-to-v9.x
Closed
[v9.x backport] Refactor async_hooks initTriggerId #18079
AndreasMadsen
wants to merge
3
commits into
nodejs:v9.x-staging
from
AndreasMadsen:backport-17273-to-v9.x
Conversation
This file contains 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
rename initTriggerId to defaultTriggerAsyncId such it matches the rest of our naming. PR-URL: #17273 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
When context is missing the executionAsyncId will be zero. For the default triggerAsyncId the zero value was used to default to the executionAsyncId. While this was not technically wrong because the functions are different themself, it poorly separated the two concepts. PR-URL: #17273 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
nodejs-github-bot
added
lib / src
Issues and PRs related to general changes in the lib or src directory.
v9.x
labels
Jan 10, 2018
AndreasMadsen
added
the
async_hooks
Issues and PRs related to the async hooks subsystem.
label
Jan 10, 2018
AndreasMadsen
changed the title
Backport 17273 to v9.x
[v9.x backport] Refactor async_hooks initTriggerId
Jan 10, 2018
3 tasks
Previously the getter would mutate the kDefaultTriggerAsncId value. This refactor changes the setter to bind the current kDefaultTriggerAsncId to a scope, such that the getter doesn't have to mutate its own value. PR-URL: #17273 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Fixed lint issue. |
addaleax
approved these changes
Jan 10, 2018
3 tasks
2 tasks
evanlucas
approved these changes
Jan 15, 2018
evanlucas
pushed a commit
that referenced
this pull request
Jan 15, 2018
When context is missing the executionAsyncId will be zero. For the default triggerAsyncId the zero value was used to default to the executionAsyncId. While this was not technically wrong because the functions are different themself, it poorly separated the two concepts. Backport-PR-URL: #18079 PR-URL: #17273 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
evanlucas
pushed a commit
that referenced
this pull request
Jan 15, 2018
Previously the getter would mutate the kDefaultTriggerAsncId value. This refactor changes the setter to bind the current kDefaultTriggerAsncId to a scope, such that the getter doesn't have to mutate its own value. Backport-PR-URL: #18079 PR-URL: #17273 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 506d85b...a880e27. Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
async_hooks
Issues and PRs related to the async hooks subsystem.
lib / src
Issues and PRs related to general changes in the lib or src directory.
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.
Backport of #17273
For performance reasons #18004 should land after.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
async_hooks