diff options
author | Rafael Gonzaga <rafael.nunu@hotmail.com> | 2021-11-13 00:48:34 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-13 00:48:34 +0300 |
commit | d10085bcb1f4c5695a54a532c8aa23d5391fb627 (patch) | |
tree | 23871c5722c24123ac9fc1e95a8b5360e2fdf0c1 /doc/api/async_hooks.md | |
parent | 8ee9e1a1aaf50d8a4afdf13dfd894d1653729227 (diff) |
async_hooks: expose async_wrap providers
docs: add asyncWrapProviders api doc
tests(async_hooks): use internalBinding for comparisson
fix(test-async-wrap): lint error
docs: use REPLACEME for asyncWrapProviders
update: use freeze and copy for asyncWrapProviders
update(async_hooks): use primordials on asyncWrapProviders
fix: use common to expect error
docs(asyncWrapProviders): rephrase return type
fix: lint md
fix: lint md
docs(async_hooks): typo
Co-authored-by: Stephen Belanger <admin@stephenbelanger.com>
update(asyncWrapProviders): add __proto__ as null
Co-authored-by: Simone Busoli <simone.busoli@gmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>
test: adjust __proto__ assertion
docs: add DEP0111 link
PR-URL: https://github.com/nodejs/node/pull/40760
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Diffstat (limited to 'doc/api/async_hooks.md')
-rw-r--r-- | doc/api/async_hooks.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md index c3170f8162f..f8d50f66d4c 100644 --- a/doc/api/async_hooks.md +++ b/doc/api/async_hooks.md @@ -758,6 +758,18 @@ const server = net.createServer((conn) => { Promise contexts may not get valid `triggerAsyncId`s by default. See the section on [promise execution tracking][]. +### `async_hooks.asyncWrapProviders` + +<!-- YAML +added: REPLACEME +--> + +* Returns: A map of provider types to the corresponding numeric id. + This map contains all the event types that might be emitted by the `async_hooks.init()` event. + +This feature suppresses the deprecated usage of `process.binding('async_wrap').Providers`. +See: [DEP0111][] + ## Promise execution tracking By default, promise executions are not assigned `asyncId`s due to the relatively @@ -841,6 +853,7 @@ The documentation for this class has moved [`AsyncResource`][]. The documentation for this class has moved [`AsyncLocalStorage`][]. +[DEP0111]: deprecations.md#dep0111-processbinding [Hook Callbacks]: #hook-callbacks [PromiseHooks]: https://docs.google.com/document/d/1rda3yKGHimKIhg5YeoAmCOtyURgsbTH_qaYR79FELlk/edit [`AsyncLocalStorage`]: async_context.md#class-asynclocalstorage |