async_hooks: add sync enterWith to async storage#31945
Closed
Qard wants to merge 1 commit intonodejs:masterfrom
Closed
async_hooks: add sync enterWith to async storage#31945Qard wants to merge 1 commit intonodejs:masterfrom
Qard wants to merge 1 commit intonodejs:masterfrom
Conversation
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.
This allows transitioning the entire following sync and async execution sub-tree to the given async storage context. With this one can be sure the context binding will remain for any following sync activity and all descending async execution whereas the
run*(...)methods must wrap everything that is intended to exist within the context. This is helpful for scenarios such as prepending a'connection'event handler to an http server which binds everything that occurs within each request to the given context. This is helpful for APMs to minimize the need for patching and especially adding closures.Depends on #31930
cc @vdeturckheim @puzpuzpuz @Flarna
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes