mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-09 17:45:38 +08:00
Node runs runNextTicks after each timer and each immediate callback, which reports the unhandled rejections the callback left before the next one runs. The event loop now leaves the timer phase when a callback leaves the rejection ledger non-empty, the check phase waits for that report, and the check phase reports the ledger after each immediate's checkpoint. When several timers expired in the same turn, a later timer ran before an earlier timer's rejection was reported. On macOS the 2 ms and 3 ms timers in 5809-process-exit-and-rejections.cjs expire together, so its uncaught 'thrown string' was printed before the TypeError rejection. 5996-rejections-between-macrotasks.cjs makes five timers expire in the same turn and checks the order across three immediates.