Skip to content

Commit 9620481

Browse files
Revert "doc: deprecate process.nextTick"
This reverts commit f7ea68a.
1 parent f256fe6 commit 9620481

File tree

2 files changed

+2
-25
lines changed

2 files changed

+2
-25
lines changed

doc/api/deprecations.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3569,22 +3569,6 @@ Calling `Hash` class directly with `Hash()` or `new Hash()` is
35693569
deprecated due to being internals, not intended for public use.
35703570
Please use the [`crypto.createHash()`][] method to create Hash instances.
35713571

3572-
### DEP0180: `process.nextTick`
3573-
3574-
<!-- YAML
3575-
changes:
3576-
- version: REPLACEME
3577-
pr-url: https://github.com/nodejs/node/pull/51280
3578-
description: Documentation-only deprecation.
3579-
-->
3580-
3581-
Type: Documentation-only
3582-
3583-
The [`process.nextTick()`][] API is deprecated due to performance
3584-
issues with async callbacks and unpredictable behavior
3585-
in promise and async/await scenarios.
3586-
Please use [`queueMicrotask()`][] instead.
3587-
35883572
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
35893573
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
35903574
[RFC 8247 Section 2.4]: https://www.rfc-editor.org/rfc/rfc8247#section-2.4
@@ -3677,9 +3661,7 @@ Please use [`queueMicrotask()`][] instead.
36773661
[`process.exitCode`]: process.md#processexitcode_1
36783662
[`process.getActiveResourcesInfo()`]: process.md#processgetactiveresourcesinfo
36793663
[`process.mainModule`]: process.md#processmainmodule
3680-
[`process.nextTick()`]: process.md#processnexttickcallback-args
36813664
[`punycode`]: punycode.md
3682-
[`queueMicrotask()`]: globals.md#queuemicrotaskcallback
36833665
[`readable.readableEnded`]: stream.md#readablereadableended
36843666
[`request.abort()`]: http.md#requestabort
36853667
[`request.connection`]: http.md#requestconnection

lib/internal/process/task_queues.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,8 @@ function processTicksAndRejections() {
9898
setHasRejectionToWarn(false);
9999
}
100100

101-
/**
102-
* `nextTick()` will not enqueue any callback when the process is about to
103-
* exit since the callback would not have a chance to be executed.
104-
* @deprecated since REPLACEME
105-
* @param {() => any} callback
106-
* @returns {void}
107-
*/
101+
// `nextTick()` will not enqueue any callback when the process is about to
102+
// exit since the callback would not have a chance to be executed.
108103
function nextTick(callback) {
109104
validateFunction(callback, 'callback');
110105

0 commit comments

Comments
 (0)