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

src: add new underlying async context tracking #52741

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Apr 28, 2024

Implements the core underlying bits of a refactored AsyncLocalStorage implementation based on the same mechanism that will be used for the standard AsyncContext API. The implementation is based on the new continuation preserved embedder data API in v8 and is designed to be significantly faster and more efficient that the current promise-hook based implementation.

This intentionally only adds the basic pieces, with the intent of spreading the refactored implementation across multiple PRs just to make things easier to review.

This is still a work in progress.

/cc @bmeck

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/gyp

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Apr 28, 2024
@jasnell jasnell force-pushed the asynccontext-refactor branch 5 times, most recently from 278ba29 to add0970 Compare April 29, 2024 02:36
Implements the core underlying bits of a refactored
AsyncLocalStorage implementation based on the same
mechanism that will be used for the standard AsyncContext
API. The implementation is based on the new continuation
preserved embedder data API in v8 and is designed to be
significantly faster and more efficient that the current
promise-hook based implementation.

This intentionally only adds the basic pieces, with the
intent of spreading the refactored implementation across
multiple PRs just to make things easier to review.
@jasnell jasnell marked this pull request as draft April 29, 2024 02:51
@Flarna
Copy link
Member

Flarna commented Apr 29, 2024

Is this somewhat related to #48528?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants