diff options
author | Stephen Belanger <admin@stephenbelanger.com> | 2020-04-17 01:23:57 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-05-09 08:52:22 +0300 |
commit | 13c5a1629cd025ba560f34f6d3190b2f38d184d4 (patch) | |
tree | 69b199545b85d7d9d71fb7500e281a3e5ef88e33 /doc/api/async_hooks.md | |
parent | 023bcdeb2848186192d2d3cd7ac33ff911b9a9ce (diff) |
async_hooks: move PromiseHook handler to JS
This avoids the need to wrap every promise in an AsyncWrap and also
makes it easier to skip the machinery to track destroy events when
there's no destroy listener.
Co-authored-by: Andrey Pechkurov <apechkurov@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/32891
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Diffstat (limited to 'doc/api/async_hooks.md')
-rw-r--r-- | doc/api/async_hooks.md | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md index 698c8f25277..1534ca85361 100644 --- a/doc/api/async_hooks.md +++ b/doc/api/async_hooks.md @@ -306,11 +306,6 @@ currently not considered public, but using the Embedder API, users can provide and document their own resource objects. For example, such a resource object could contain the SQL query being executed. -In the case of Promises, the `resource` object will have an -`isChainedPromise` property, set to `true` if the promise has a parent promise, -and `false` otherwise. For example, in the case of `b = a.then(handler)`, `a` is -considered a parent `Promise` of `b`. Here, `b` is considered a chained promise. - In some cases the resource object is reused for performance reasons, it is thus not safe to use it as a key in a `WeakMap` or add properties to it. |