Unverified Commit 9af62641 authored by Gerhard Stoebich's avatar Gerhard Stoebich Committed by Shelley Vohr
Browse files

async_hooks: execute destroy hooks earlier

Use a microtask to call destroy hooks in case there are a lot queued
as immediate may be scheduled late in case of long running
promise chains.

Queuing a mircrotasks in GC context is not allowed therefore an
interrupt is triggered to do this in JS context as fast as possible.

fixes: https://github.com/nodejs/node/issues/34328
refs: https://github.com/nodejs/node/issues/33896

PR-URL: https://github.com/nodejs/node/pull/34342
Fixes: https://github.com/nodejs/node/issues/34328
Refs: https://github.com/nodejs/node/issues/33896


Reviewed-By: default avatarGus Caplan <me@gus.host>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 0a9389bb
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment