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:
Gus Caplan committed 2018-10-04 01:27:43 -05:00
1 parent c3aaaa70b8
commit f2172012f3
1 file changed
+2 -2
+2 -2
View File
@@ -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