About 260 results
Open links in new tab
  1. Event loop: microtasks and macrotasks - The Modern JavaScript ...

    May 17, 2024 · Understanding how event loop works is important for optimizations, and sometimes for the right architecture. In this chapter we first cover theoretical details about how things work, and …

  2. Difference between microtask and macrotask within an event ...

    Sep 18, 2014 · Separation of macro and microtask enables the event loop to prioritize types of tasks; for example, giving priority to performance-sensitive tasks. In a single loop iteration, one macro task at …

  3. What are the microtask and macrotask within an event loop in ...

    Jan 25, 2023 · Micro-tasks are often scheduled for things that are required to be completed immediately after the execution of the current script. On completion of one macro-task, the event loop moves on …

  4. Microtasks vs Macrotasks: Mastering the JavaScript Event Loop

    Jan 13, 2026 · At the heart of how JavaScript handles asynchronous operations lies the event loop — and within it, two distinct queues that determine execution priority: the microtask queue and the...

  5. Microtask vs Macrotask in JavaScript — How the Event Loop ...

    Learn the difference between microtasks and macrotasks in JavaScript, how the event loop schedules them, and how they affect async behavior.

  6. Visualizing the Event Loop: A Guide to Microtasks, Macros ...

    Nov 25, 2025 · JavaScript utilizes a single main thread of execution coupled with a sophisticated mechanism known as the Event Loop. It can only do one thing at a time. Here is the flow you need to …

  7. The JavaScript Event Loop — macro/microtasks, rendering, and ...

    Sep 20, 2025 · Each turn of the browser loop runs one macrotask (e.g., setTimeout, event), then flushes microtasks (e.g., Promise.then, queueMicrotask), then may render a frame.