Skip to content

Commit

Permalink
fixup! doc: remove "idiomatic choice" from queueMicrotask
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Oct 29, 2018
1 parent 385510b commit a6da5fd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doc/api/globals.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,10 @@ The `queueMicrotask()` method queues a microtask to invoke `callback`. If
`callback` throws an exception, the [`process` object][] `'uncaughtException'`
event will be emitted.

`process.nextTick()` will always run before the microtask queue, and so
unexpected execution order may be observed.
The microtask queue is managed by V8 and may be used in a similar manner to
the `process.nextTick()` queue, which is managed by Node.js. The
`process.nextTick()` queue is always processed before the microtask queue
within each turn of the Node.js event loop.

```js
// Here, `queueMicrotask()` is used to ensure the 'load' event is always
Expand Down

0 comments on commit a6da5fd

Please sign in to comment.