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

worker: add hasRef() to MessagePort #42849

Merged

Commits on Apr 24, 2022

  1. worker: add hasRef() to MessagePort

    Since we were removing the hasRef() method before exposing the
    MessagePort object, the only way of knowing if the handle was keeping
    the event loop active was to parse the string returned by
    util.inspect(port), which is inconvenient and inconsistent with most of
    the other async resources. So this change stops removing hasRef() from
    the MessagePort prototype. The reason why this is also being documented
    is that while reporting active resources, async_hooks returns the same
    MessagePort object as the one that is accessible by users.
    
    Refs: nodejs#42091 (comment)
    Signed-off-by: Darshan Sen <raisinten@gmail.com>
    RaisinTen committed Apr 24, 2022
    Configuration menu
    Copy the full SHA
    a739471 View commit details
    Browse the repository at this point in the history