diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-05-22 21:47:06 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-06-06 19:44:12 +0200 |
commit | a319b4a3985cb055f68285817b64ad378e339c6c (patch) | |
tree | b08cb159420a07f6008db0e70ed3f13032802113 | |
parent | 229dca3dee552f448dc9026237625ed58e8acfdc (diff) | |
download | android-node-v8-a319b4a3985cb055f68285817b64ad378e339c6c.tar.gz android-node-v8-a319b4a3985cb055f68285817b64ad378e339c6c.tar.bz2 android-node-v8-a319b4a3985cb055f68285817b64ad378e339c6c.zip |
doc: explain Worker semantics in async_hooks.md
PR-URL: https://github.com/nodejs/node/pull/20876
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
-rw-r--r-- | doc/api/async_hooks.md | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md index 3a6a44d0f7..29dd525941 100644 --- a/doc/api/async_hooks.md +++ b/doc/api/async_hooks.md @@ -21,6 +21,9 @@ A resource can also be closed before the callback is called. `AsyncHook` does not explicitly distinguish between these different cases but will represent them as the abstract concept that is a resource. +If [`Worker`][]s are used, each thread has an independent `async_hooks` +interface, and each thread will use a new set of async IDs. + ## Public API ### Overview @@ -224,7 +227,7 @@ clearTimeout(setTimeout(() => {}, 10)); ``` Every new resource is assigned an ID that is unique within the scope of the -current process. +current Node.js instance. ###### `type` @@ -725,3 +728,4 @@ never be called. [Hook Callbacks]: #async_hooks_hook_callbacks [PromiseHooks]: https://docs.google.com/document/d/1rda3yKGHimKIhg5YeoAmCOtyURgsbTH_qaYR79FELlk [promise execution tracking]: #async_hooks_promise_execution_tracking +[`Worker`]: worker.html#worker_worker |