summaryrefslogtreecommitdiff
path: root/doc/api/async_hooks.md
diff options
context:
space:
mode:
authorMatteo Collina <hello@matteocollina.com>2019-03-08 16:42:21 +0100
committerMatteo Collina <hello@matteocollina.com>2019-03-18 11:36:48 +0100
commit9d064439e5716df250363ed6f88198c86eb63521 (patch)
treed9f9da150a71bdbe9038abc1dfe87fc57b0332d0 /doc/api/async_hooks.md
parentabafd38c8d4e1a280f97ea452688cda54424d185 (diff)
downloadandroid-node-v8-9d064439e5716df250363ed6f88198c86eb63521.tar.gz
android-node-v8-9d064439e5716df250363ed6f88198c86eb63521.tar.bz2
android-node-v8-9d064439e5716df250363ed6f88198c86eb63521.zip
async_hooks: remove deprecated emitBefore and emitAfter
AsyncResource.emitBefore and AsyncResource.emitAfter have been deprecated in https://github.com/nodejs/node/pull/18632. This PR removes it all. This commit also updates some embedder tests to use internal APIs. The conditions are still possible for Node.js core developers but not for end users. PR-URL: https://github.com/nodejs/node/pull/26530 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Benedikt Meurer <benedikt.meurer@gmail.com> Reviewed-By: Yang Guo <yangguo@chromium.org> Reviewed-By: Andreas Madsen <amwebdk@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/async_hooks.md')
-rw-r--r--doc/api/async_hooks.md36
1 files changed, 0 insertions, 36 deletions
diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md
index fe4f87c9ef..8878c03aa7 100644
--- a/doc/api/async_hooks.md
+++ b/doc/api/async_hooks.md
@@ -659,41 +659,6 @@ of the async resource. This will establish the context, trigger the AsyncHooks
before callbacks, call the function, trigger the AsyncHooks after callbacks, and
then restore the original execution context.
-#### asyncResource.emitBefore()
-<!-- YAML
-deprecated: v9.6.0
--->
-> Stability: 0 - Deprecated: Use [`asyncResource.runInAsyncScope()`][] instead.
-
-Call all `before` callbacks to notify that a new asynchronous execution context
-is being entered. If nested calls to `emitBefore()` are made, the stack of
-`asyncId`s will be tracked and properly unwound.
-
-`before` and `after` calls must be unwound in the same order that they
-are called. Otherwise, an unrecoverable exception will occur and the process
-will abort. For this reason, the `emitBefore` and `emitAfter` APIs are
-considered deprecated. Please use `runInAsyncScope`, as it provides a much safer
-alternative.
-
-#### asyncResource.emitAfter()
-<!-- YAML
-deprecated: v9.6.0
--->
-> Stability: 0 - Deprecated: Use [`asyncResource.runInAsyncScope()`][] instead.
-
-Call all `after` callbacks. If nested calls to `emitBefore()` were made, then
-make sure the stack is unwound properly. Otherwise an error will be thrown.
-
-If the user's callback throws an exception, `emitAfter()` will automatically be
-called for all `asyncId`s on the stack if the error is handled by a domain or
-`'uncaughtException'` handler.
-
-`before` and `after` calls must be unwound in the same order that they
-are called. Otherwise, an unrecoverable exception will occur and the process
-will abort. For this reason, the `emitBefore` and `emitAfter` APIs are
-considered deprecated. Please use `runInAsyncScope`, as it provides a much safer
-alternative.
-
#### asyncResource.emitDestroy()
* Returns: {AsyncResource} A reference to `asyncResource`.
@@ -713,7 +678,6 @@ never be called.
`AsyncResource` constructor.
[`after` callback]: #async_hooks_after_asyncid
-[`asyncResource.runInAsyncScope()`]: #async_hooks_asyncresource_runinasyncscope_fn_thisarg_args
[`before` callback]: #async_hooks_before_asyncid
[`destroy` callback]: #async_hooks_destroy_asyncid
[`init` callback]: #async_hooks_init_asyncid_type_triggerasyncid_resource