Skip to content

Commit

Permalink
doc: fix confusing language about microtask queue
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
devsnek authored and jasnell committed Oct 17, 2018
1 parent 0adca98 commit 5ed4b89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/globals.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5ed4b89

Please sign in to comment.