Skip to content

async_hooks: add sync enterWith to async storage#31945

Closed
Qard wants to merge 1 commit intonodejs:masterfrom
Qard:async-storage-start
Closed

async_hooks: add sync enterWith to async storage#31945
Qard wants to merge 1 commit intonodejs:masterfrom
Qard:async-storage-start

Conversation

@Qard
Copy link
Member

@Qard Qard commented Feb 25, 2020

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), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Loading
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. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants