GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: remove "idiomatic choice" from queueMicrotask · nodejs/node@ee299c7

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • globals.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/globals.md‎

Copy file name to clipboardExpand all lines: doc/api/globals.md
+4-3Lines changed: 4 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,10 @@ The `queueMicrotask()` method queues a microtask to invoke `callback`. If
122122
`callback` throws an exception, the [`process` object][] `'uncaughtException'`
123123
event will be emitted.
124124

125-
In general, `queueMicrotask` is the idiomatic choice over `process.nextTick()`.
126-
`process.nextTick()` will always run before the microtask queue, and so
127-
unexpected execution order may be observed.
125+
The microtask queue is managed by V8 and may be used in a similar manner to
126+
the `process.nextTick()` queue, which is managed by Node.js. The
127+
`process.nextTick()` queue is always processed before the microtask queue
128+
within each turn of the Node.js event loop.
128129

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

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.