summaryrefslogtreecommitdiff
path: root/doc/api/async_hooks.md
diff options
context:
space:
mode:
authorGerhard Stoebich <deb2001-github@yahoo.de>2018-11-02 23:58:37 +0100
committerVse Mozhet Byt <vsemozhetbyt@gmail.com>2018-11-11 20:13:38 +0200
commit7cf9a33e0e45136f3e7d1c47b9e095cae1ceeea6 (patch)
tree796961d345fdedd2b15a0ca153677a070f4ca3a5 /doc/api/async_hooks.md
parenta4cae978fc9a60c31ec443ee72bfc5770a742b92 (diff)
downloadandroid-node-v8-7cf9a33e0e45136f3e7d1c47b9e095cae1ceeea6.tar.gz
android-node-v8-7cf9a33e0e45136f3e7d1c47b9e095cae1ceeea6.tar.bz2
android-node-v8-7cf9a33e0e45136f3e7d1c47b9e095cae1ceeea6.zip
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: https://github.com/nodejs/node/pull/24050 Refs: https://github.com/nodejs/node/pull/20894 Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/async_hooks.md')
-rw-r--r--doc/api/async_hooks.md39
1 files changed, 15 insertions, 24 deletions
diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md
index 4d0494d781..b1abfc63a2 100644
--- a/doc/api/async_hooks.md
+++ b/doc/api/async_hooks.md
@@ -276,8 +276,8 @@ require('net').createServer((conn) => {}).listen(8080);
Output when hitting the server with `nc localhost 8080`:
```console
-TCPSERVERWRAP(2): trigger: 1 execution: 1
-TCPWRAP(4): trigger: 2 execution: 0
+TCPSERVERWRAP(5): trigger: 1 execution: 1
+TCPWRAP(7): trigger: 5 execution: 0
```
The `TCPSERVERWRAP` is the server which receives the connections.
@@ -354,27 +354,18 @@ require('net').createServer(() => {}).listen(8080, () => {
Output from only starting the server:
```console
-TCPSERVERWRAP(2): trigger: 1 execution: 1
-TickObject(3): trigger: 2 execution: 1
-before: 3
- Timeout(4): trigger: 3 execution: 3
- TIMERWRAP(5): trigger: 3 execution: 3
-after: 3
-destroy: 3
-before: 5
- before: 4
- TTYWRAP(6): trigger: 4 execution: 4
- SIGNALWRAP(7): trigger: 4 execution: 4
- TTYWRAP(8): trigger: 4 execution: 4
->>> 4
- TickObject(9): trigger: 4 execution: 4
- after: 4
-after: 5
-before: 9
-after: 9
-destroy: 4
-destroy: 9
-destroy: 5
+TCPSERVERWRAP(5): trigger: 1 execution: 1
+TickObject(6): trigger: 5 execution: 1
+before: 6
+ Timeout(7): trigger: 6 execution: 6
+after: 6
+destroy: 6
+before: 7
+>>> 7
+ TickObject(8): trigger: 7 execution: 7
+after: 7
+before: 8
+after: 8
```
As illustrated in the example, `executionAsyncId()` and `execution` each specify
@@ -384,7 +375,7 @@ the value of the current execution context; which is delineated by calls to
Only using `execution` to graph resource allocation results in the following:
```console
-TTYWRAP(6) -> Timeout(4) -> TIMERWRAP(5) -> TickObject(3) -> root(1)
+Timeout(7) -> TickObject(6) -> root(1)
```
The `TCPSERVERWRAP` is not part of this graph, even though it was the reason for