Skip to content

Commit 3488f0d

Browse files
sam-githubaddaleax
authored andcommitted
doc: link nextTick docs to the nextTick guide
Link the guide discussing timers and nextTick from the nextTick docs, as it already was from the timers docs. Make the link text and targets more specific. PR-URL: #25619 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
1 parent 7cc5153 commit 3488f0d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

doc/api/process.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -1463,9 +1463,9 @@ changes:
14631463

14641464
`process.nextTick()` adds `callback` to the "next tick queue". This queue is
14651465
fully drained after the current operation on the JavaScript stack runs to
1466-
completion and before the event loop is allowed to continue. As a result, it's
1467-
possible to create an infinite loop if one were to recursively call
1468-
`process.nextTick()`.
1466+
completion and before the event loop is allowed to continue. It's possible to
1467+
create an infinite loop if one were to recursively call `process.nextTick()`.
1468+
See the [Event Loop] guide for more background.
14691469

14701470
```js
14711471
console.log('start');
@@ -2265,6 +2265,7 @@ cases:
22652265
[Child Process]: child_process.html
22662266
[Cluster]: cluster.html
22672267
[Duplex]: stream.html#stream_duplex_and_transform_streams
2268+
[Event Loop]: https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick
22682269
[LTS]: https://github.com/nodejs/Release
22692270
[Readable]: stream.html#stream_readable_streams
22702271
[Signal Events]: #process_signal_events

doc/api/timers.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ globals, there is no need to call `require('timers')` to use the API.
1010

1111
The timer functions within Node.js implement a similar API as the timers API
1212
provided by Web Browsers but use a different internal implementation that is
13-
built around [the Node.js Event Loop][].
13+
built around the Node.js [Event Loop][].
1414

1515
## Class: Immediate
1616

@@ -263,6 +263,7 @@ added: v0.0.1
263263

264264
Cancels a `Timeout` object created by [`setTimeout()`][].
265265

266+
[Event Loop]: https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout
266267
[`TypeError`]: errors.html#errors_class_typeerror
267268
[`clearImmediate()`]: timers.html#timers_clearimmediate_immediate
268269
[`clearInterval()`]: timers.html#timers_clearinterval_timeout
@@ -271,4 +272,3 @@ Cancels a `Timeout` object created by [`setTimeout()`][].
271272
[`setInterval()`]: timers.html#timers_setinterval_callback_delay_args
272273
[`setTimeout()`]: timers.html#timers_settimeout_callback_delay_args
273274
[`util.promisify()`]: util.html#util_util_promisify_original
274-
[the Node.js Event Loop]: https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/

0 commit comments

Comments
 (0)