diff options
author | Anna Henningsen <anna@addaleax.net> | 2017-09-14 18:58:53 +0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2017-09-20 16:45:33 +0300 |
commit | 602fd36d952af2ee1104b73cf619b50020f08849 (patch) | |
tree | 4cc577d1a0b95869a42905fc3c335304cb04ab33 /doc/api/domain.md | |
parent | 750c0802f5e1804284b59c2180d46dc6ba1aa6b1 (diff) |
domain: remove `.dispose()`
`domain.dispose()` is generally considered an anti-pattern, has been
runtime-deprecated for over 4 years, and is a part of the `domain`
module that can not be emulated by `async_hooks`; so remove it.
Ref: https://nodejs.org/en/docs/guides/domain-postmortem/
Ref: 4a74fc9776d825115849997f4adacb46f4303494
PR-URL: https://github.com/nodejs/node/pull/15412
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'doc/api/domain.md')
-rw-r--r-- | doc/api/domain.md | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/doc/api/domain.md b/doc/api/domain.md index a4a31d4fecd..285378c3bd5 100644 --- a/doc/api/domain.md +++ b/doc/api/domain.md @@ -217,7 +217,7 @@ added. Implicit binding routes thrown errors and `'error'` events to the Domain's `'error'` event, but does not register the EventEmitter on the -Domain, so [`domain.dispose()`][] will not shut down the EventEmitter. +Domain. Implicit binding only takes care of thrown errors and `'error'` events. ## Explicit Binding @@ -329,15 +329,6 @@ d.on('error', (er) => { }); ``` -### domain.dispose() - -> Stability: 0 - Deprecated. Please recover from failed IO actions -> explicitly via error event handlers set on the domain. - -Once `dispose` has been called, the domain will no longer be used by callbacks -bound into the domain via `run`, `bind`, or `intercept`, and a `'dispose'` event -is emitted. - ### domain.enter() The `enter` method is plumbing used by the `run`, `bind`, and `intercept` @@ -351,9 +342,6 @@ Calling `enter` changes only the active domain, and does not alter the domain itself. `enter` and `exit` can be called an arbitrary number of times on a single domain. -If the domain on which `enter` is called has been disposed, `enter` will return -without setting the domain. - ### domain.exit() The `exit` method exits the current domain, popping it off the domain stack. @@ -369,9 +357,6 @@ Calling `exit` changes only the active domain, and does not alter the domain itself. `enter` and `exit` can be called an arbitrary number of times on a single domain. -If the domain on which `exit` is called has been disposed, `exit` will return -without exiting the domain. - ### domain.intercept(callback) * `callback` {Function} The callback function @@ -500,7 +485,6 @@ rejections. [`EventEmitter`]: events.html#events_class_eventemitter [`domain.add(emitter)`]: #domain_domain_add_emitter [`domain.bind(callback)`]: #domain_domain_bind_callback -[`domain.dispose()`]: #domain_domain_dispose [`domain.exit()`]: #domain_domain_exit [`setInterval()`]: timers.html#timers_setinterval_callback_delay_args [`setTimeout()`]: timers.html#timers_settimeout_callback_delay_args |