Glossary coding Term Page

Macrotask Queue

Queue that schedules setTimeout, I/O, message, or user-event work for later turns.

macrotask-queue #javascript#event-loop
Korean version

Aliases

macrotask queuetask queue

Related Concepts

Core Idea

setTimeout, setInterval, DOM events, and networking callbacks land in the macrotask queue. The event loop pulls one macrotask at a time after emptying microtasks and possibly painting, so each callback starts a fresh turn with a clean stack.

Why It Matters Here

In Mathbong's debounce/throttle lessons, macrotasks represent the deliberate delay you add to control input noise. Knowing that the microtask queue always runs first explains why timers feel slower and how to pick the right queue for UI work.

Posts Mentioning This Concept