Microtask Queue
A task queue in the JavaScript runtime that holds microtasks such as Promise callbacks and those scheduled via queueMicrotask, and is fully drained and executed after the current macrotask completes.
Timeline (last 90 days)
The JavaScript runtime maintains a microtask queue, into which every Promise's .then, .catch, and .finally callbacks as well as queueMicrotask calls are enqueued.
The microtask queue is fully drained after the current macrotask ends and before the next macrotask begins, so multiple consecutive .then calls complete synchronously within the same event loop turn.
All Facts (2)
The JavaScript runtime maintains a microtask queue, into which every Promise's .then, .catch, and .finally callbacks as well as queueMicrotask calls are enqueued.
50%UnverifiedThe microtask queue is fully drained after the current macrotask ends and before the next macrotask begins, so multiple consecutive .then calls complete synchronously within the same event loop turn.
50%