diff options
author | Rod Vagg <rod@vagg.org> | 2018-10-26 01:52:12 +0300 |
---|---|---|
committer | Rod Vagg <rod@vagg.org> | 2018-10-30 23:38:30 +0300 |
commit | ad670fa1c757911da8060fd99486aaf4c721cf39 (patch) | |
tree | 6c2822f057d48868928070cba3484fc71393d32d /doc/api/globals.md | |
parent | 0a4a08f5521c71710fd1e940600bf82dd2fd7230 (diff) |
doc: remove "idiomatic choice" from queueMicrotask
It can't be idiomatic if it's not in general use and therefore hasn't
been picked up by users. It's not even in browsers yet.
"Idiomatic" use is an emergent property that comes from observed use
and this feature is so new (to browsers and Node) that it can't
possibly be. In general I don't think it's the place of the Node API
docs to observe what emerges as idiomatic Node.js.
It also can't be a recommended feature (if that was the intent of the
language) because it's marked experimental. For now, it's just a
feature, nothing more. Recommendations and/or observations about it
being 'idiomatic' can come later.
PR-URL: https://github.com/nodejs/node/pull/23885
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'doc/api/globals.md')
-rw-r--r-- | doc/api/globals.md | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/api/globals.md b/doc/api/globals.md index e41d6218831..22699f035e5 100644 --- a/doc/api/globals.md +++ b/doc/api/globals.md @@ -122,9 +122,10 @@ The `queueMicrotask()` method queues a microtask to invoke `callback`. If `callback` throws an exception, the [`process` object][] `'uncaughtException'` event will be emitted. -In general, `queueMicrotask` is the idiomatic choice over `process.nextTick()`. -`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 |