mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
doc: fix confusing language about microtask queue
PR-URL: https://github.com/nodejs/node/pull/23197 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
1 file changed
+2
-2
+2
-2
@@ -123,8 +123,8 @@ The `queueMicrotask()` method queues a microtask to invoke `callback`. If
|
||||
be emitted.
|
||||
|
||||
In general, `queueMicrotask` is the idiomatic choice over `process.nextTick()`.
|
||||
`process.nextTick()` will always run before microtasks, and so unexpected
|
||||
execution order may be observed.
|
||||
`process.nextTick()` will always run before the microtask queue, and so
|
||||
unexpected execution order may be observed.
|
||||
|
||||
```js
|
||||
// Here, `queueMicrotask()` is used to ensure the 'load' event is always
|
||||
|
||||
Reference in new issue
Block a user