event loop tick
One complete pass of the event loop through all of its phases.
In more detail
Despite the name, process.nextTick() does not wait for the next tick: its callbacks run as soon as the current operation finishes. Timers and immediates each wait for their own phase in a tick.
Related terms
- event loop — The central loop of an asynchronous program that waits for events, such as timers firing or data arriving, and runs the matching callbacks.
- event loop phase — One of the six stages the Node.js event loop visits in order on every turn: timers, pending callbacks, idle/prepare, poll, check and close callbacks.
- process.nextTick() — A Node.js function that queues a callback to run as soon as the current operation finishes, before promise callbacks and before the event loop continues.
Taught in
- Event Loop Lifecycle: The Six Phases & libuv uv_run — Node.js Internals & Backend Services
- Microtask Queues: process.nextTick vs Promise Timing — Node.js Internals & Backend Services
- Poll & Check Phases: I/O Callbacks & setImmediate — Node.js Internals & Backend Services