mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-08 08:44:37 +08:00
After each setImmediate callback the loop now runs the process.nextTick queue to exhaustion before promise jobs and queueMicrotask callbacks, and repeats until both are empty, as Node does after every macrotask. Before, only promise jobs ran between immediates, so a tick queued by one immediate ran after the next immediate. The timer phase and the I/O dispatch stations also return to the checkpoint when only ticks are pending, and the dispatch hooks yield between event batches for pending ticks as they do for promise jobs.