Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions pages/asynchronous-work/event-loop-timers-and-nexttick.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,12 @@ Between each run of the event loop, Node.js checks if it is waiting for
any asynchronous I/O or timers and shuts down cleanly if there are not
any.

Starting with libuv 1.45.0 (Node.js 20), the event loop behavior
changed to run timers only after the **poll** phase, instead of both before and after
as in earlier versions. This change can affect the timing of `setImmediate()` callbacks
and how they interact with timers in certain scenarios.
Starting with libuv 1.45.0 (Node.js 20), timers are run after the
**poll** phase in each event loop iteration. In earlier versions, timers
were run before polling. To preserve backwards compatibility, libuv
1.45.0 still runs timers once before entering the event loop . This change can affect the timing of
`setImmediate()` callbacks and how they interact with timers in certain
scenarios.
Comment thread
Archkon marked this conversation as resolved.

## Phases in Detail

Expand Down
Loading