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

async_hooks: remove experimental onPropagate option #46386

Closed

Commits on Jan 30, 2023

  1. async_hooks: remove experimental onPropagate option

    Refs: nodejs#46374
    
    The `onPropagate` option for `AsyncLocalStorage` is problematic for a
    couple of reasons:
    
    1. It is not expected to be forwards compatible in any way with the
       upcoming TC-39 `AsyncContext` proposal.
    2. It introduces a non-trivial O(n) cost invoking a JavaScript callback
       for *every* AsyncResource that is created, including every Promise.
    
    While it is still experimental, I recommend removing it while we can
    revisit the fundamental use cases in light of the coming `AsyncContext`
    proposal.
    jasnell committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    3c265fa View commit details
    Browse the repository at this point in the history