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_wrap: schedule destroy hook as unref #18241

Closed
wants to merge 1 commit into from

Commits on Jan 20, 2018

  1. async_wrap: schedule destroy hook as unref

    Since the `DestroyAsyncIdsCallback` in Node.js can be scheduled as
    a result of GC, that means that it can accidentally keep the event
    loop open when it shouldn't.
    
    Replace `SetImmediate` with the newly introduced `SetUnrefImmediate`
    and in addition introduce RunBeforeExit callbacks, of which
    `DestroyAsyncIdsCallback` is now the first. These callbacks will run
    before the `beforeExit` event is emitted (which will now only be
    emitted if the event loop is still not active).
    apapirovski committed Jan 20, 2018
    Configuration menu
    Copy the full SHA
    002937f View commit details
    Browse the repository at this point in the history