diff options
author | Tony Gorez <gorez.tony@gmail.com> | 2022-02-03 13:49:34 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-03 13:49:34 +0300 |
commit | 064783cf5a8ffff697dbba092ed92eab535822b9 (patch) | |
tree | 2baca60aa36587f31f09762fb09e7d43a926e64d /doc/api/async_hooks.md | |
parent | f94f113bad9508b8dd321339e3e5d76ea5222484 (diff) |
doc: add note about resource type in async_hooks
PR-URL: https://github.com/nodejs/node/pull/41797
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Diffstat (limited to 'doc/api/async_hooks.md')
-rw-r--r-- | doc/api/async_hooks.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md index 516199f9391..1bdeb6e600a 100644 --- a/doc/api/async_hooks.md +++ b/doc/api/async_hooks.md @@ -329,6 +329,8 @@ The `type` is a string identifying the type of resource that caused `init` to be called. Generally, it will correspond to the name of the resource's constructor. +Valid values are: + ```text FSEVENTWRAP, FSREQCALLBACK, GETADDRINFOREQWRAP, GETNAMEINFOREQWRAP, HTTPINCOMINGMESSAGE, HTTPCLIENTREQUEST, JSSTREAM, PIPECONNECTWRAP, PIPEWRAP, PROCESSWRAP, QUERYWRAP, @@ -337,6 +339,9 @@ TTYWRAP, UDPSENDWRAP, UDPWRAP, WRITEWRAP, ZLIB, SSLCONNECTION, PBKDF2REQUEST, RANDOMBYTESREQUEST, TLSWRAP, Microtask, Timeout, Immediate, TickObject ``` +These values can change in any Node.js release. Furthermore users of [`AsyncResource`][] +likely provide other values. + There is also the `PROMISE` resource type, which is used to track `Promise` instances and asynchronous work scheduled by them. |