summaryrefslogtreecommitdiff
path: root/doc/api/async_hooks.md
diff options
context:
space:
mode:
authorAnatoli Papirovski <apapirovski@mac.com>2018-01-18 16:52:51 -0500
committerAnatoli Papirovski <apapirovski@mac.com>2018-01-21 12:39:41 -0500
commit8803b69c724e7b03ec0fc4c82b71575262487624 (patch)
tree4e7b737d45ada0a40c2d142a9fd44a26270335ba /doc/api/async_hooks.md
parentd62566e1b1bb4734635d51d53c16f6efa3a7f5b5 (diff)
downloadandroid-node-v8-8803b69c724e7b03ec0fc4c82b71575262487624.tar.gz
android-node-v8-8803b69c724e7b03ec0fc4c82b71575262487624.tar.bz2
android-node-v8-8803b69c724e7b03ec0fc4c82b71575262487624.zip
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). PR-URL: https://github.com/nodejs/node/pull/18241 Fixes: https://github.com/nodejs/node/issues/18190 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Diffstat (limited to 'doc/api/async_hooks.md')
0 files changed, 0 insertions, 0 deletions