Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6caa354

Browse filesBrowse files
addaleaxtargos
authored andcommitted
doc: explain Worker semantics in async_hooks.md
PR-URL: #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>
1 parent ed05d9a commit 6caa354
Copy full SHA for 6caa354

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Open diff view settings
Collapse file

‎doc/api/async_hooks.md‎

Copy file name to clipboardExpand all lines: doc/api/async_hooks.md
+5-1Lines changed: 5 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ A resource can also be closed before the callback is called. `AsyncHook` does
2121
not explicitly distinguish between these different cases but will represent them
2222
as the abstract concept that is a resource.
2323

24+
If [`Worker`][]s are used, each thread has an independent `async_hooks`
25+
interface, and each thread will use a new set of async IDs.
26+
2427
## Public API
2528

2629
### Overview
@@ -224,7 +227,7 @@ clearTimeout(setTimeout(() => {}, 10));
224227
```
225228

226229
Every new resource is assigned an ID that is unique within the scope of the
227-
current process.
230+
current Node.js instance.
228231

229232
###### `type`
230233

@@ -725,3 +728,4 @@ never be called.
725728
[Hook Callbacks]: #async_hooks_hook_callbacks
726729
[PromiseHooks]: https://docs.google.com/document/d/1rda3yKGHimKIhg5YeoAmCOtyURgsbTH_qaYR79FELlk
727730
[promise execution tracking]: #async_hooks_promise_execution_tracking
731+
[`Worker`]: worker.html#worker_worker

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.