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 0260db5

Browse filesBrowse files
FlarnaMylesBorins
authored andcommitted
doc: correct async_hooks sample outputs
Correct the output of async_hooks samples * `TIMERWRAP` has been removed in #20894 * `console.log()` doesn't issue `TTYWRAP` nor `SIGNALWRAP` I don't know which PR caused that `console.log()` is no longer using `TTYWRAP` and `SIGNALWRAP`; I think it was between 8.4.0 and 8.5.0. PR-URL: #24050 Refs: #20894 Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 63dc221 commit 0260db5
Copy full SHA for 0260db5

File tree

Expand file treeCollapse file tree

1 file changed

+15
-24
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+15
-24
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
+15-24Lines changed: 15 additions & 24 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ require('net').createServer((conn) => {}).listen(8080);
276276
Output when hitting the server with `nc localhost 8080`:
277277

278278
```console
279-
TCPSERVERWRAP(2): trigger: 1 execution: 1
280-
TCPWRAP(4): trigger: 2 execution: 0
279+
TCPSERVERWRAP(5): trigger: 1 execution: 1
280+
TCPWRAP(7): trigger: 5 execution: 0
281281
```
282282

283283
The `TCPSERVERWRAP` is the server which receives the connections.
@@ -355,27 +355,18 @@ require('net').createServer(() => {}).listen(8080, () => {
355355
Output from only starting the server:
356356

357357
```console
358-
TCPSERVERWRAP(2): trigger: 1 execution: 1
359-
TickObject(3): trigger: 2 execution: 1
360-
before: 3
361-
Timeout(4): trigger: 3 execution: 3
362-
TIMERWRAP(5): trigger: 3 execution: 3
363-
after: 3
364-
destroy: 3
365-
before: 5
366-
before: 4
367-
TTYWRAP(6): trigger: 4 execution: 4
368-
SIGNALWRAP(7): trigger: 4 execution: 4
369-
TTYWRAP(8): trigger: 4 execution: 4
370-
>>> 4
371-
TickObject(9): trigger: 4 execution: 4
372-
after: 4
373-
after: 5
374-
before: 9
375-
after: 9
376-
destroy: 4
377-
destroy: 9
378-
destroy: 5
358+
TCPSERVERWRAP(5): trigger: 1 execution: 1
359+
TickObject(6): trigger: 5 execution: 1
360+
before: 6
361+
Timeout(7): trigger: 6 execution: 6
362+
after: 6
363+
destroy: 6
364+
before: 7
365+
>>> 7
366+
TickObject(8): trigger: 7 execution: 7
367+
after: 7
368+
before: 8
369+
after: 8
379370
```
380371

381372
As illustrated in the example, `executionAsyncId()` and `execution` each specify
@@ -385,7 +376,7 @@ the value of the current execution context; which is delineated by calls to
385376
Only using `execution` to graph resource allocation results in the following:
386377

387378
```console
388-
TTYWRAP(6) -> Timeout(4) -> TIMERWRAP(5) -> TickObject(3) -> root(1)
379+
Timeout(7) -> TickObject(6) -> root(1)
389380
```
390381

391382
The `TCPSERVERWRAP` is not part of this graph, even though it was the reason for

0 commit comments

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