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 promise object from resource #23443

Commits on Oct 12, 2018

  1. async_hooks: remove promise object from resource

    While it doesn't make any difference now. In the future PromiseHooks
    could be refactored to provide an asyncId instead of the promise object.
    That would make escape analysis on promises possible.
    
    Escape analysis on promises could lead to a more efficient destroy hook,
    if provide by PromiseHooks as well. But at the very least would allow
    the destroy hook to be emitted earlier. The destroy hook not being
    emitted on promises frequent enough is a known and reported issue.
    See nodejs#14446 and
    Jeff-Lewis/cls-hooked#11.
    
    While all this is speculation for now, it all depends on the promise
    object not being a part of the PromiseWrap resource object.
    
    Ref: nodejs#14446
    Ref: nodejs/diagnostics#188
    AndreasMadsen committed Oct 12, 2018
    Configuration menu
    Copy the full SHA
    94cf999 View commit details
    Browse the repository at this point in the history