Tag

macrotasks

1 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 24, 2023 · Frontend Development

Understanding JavaScript Event Loop, Microtasks and Macrotasks

This article explains JavaScript’s single‑threaded nature, the event loop mechanism, and the distinction between microtasks and macrotasks, illustrating their execution order with detailed code examples and step‑by‑step analysis to help developers grasp asynchronous behavior in front‑end development.

Frontend DevelopmentJavaScriptMicrotasks
0 likes · 7 min read
Understanding JavaScript Event Loop, Microtasks and Macrotasks
ByteFE
ByteFE
Nov 8, 2022 · Frontend Development

Understanding the JavaScript Event Loop in Browsers and Node.js

This article explains the fundamentals of JavaScript's event loop, covering browser asynchronous execution, macro‑ and micro‑tasks, timer inaccuracies, view rendering, and the differences in Node.js implementation, while providing code examples to illustrate execution order and practical implications for developers.

AsyncJavaScriptMicrotasks
0 likes · 18 min read
Understanding the JavaScript Event Loop in Browsers and Node.js
Sohu Tech Products
Sohu Tech Products
Oct 19, 2022 · Fundamentals

Understanding the JavaScript Event Loop in Browsers and Node.js

This article explains the fundamentals of JavaScript's event loop, covering single‑threaded execution, the role of macro‑tasks and micro‑tasks, differences between browser and Node.js implementations, and includes code examples that illustrate task scheduling and execution order.

AsyncJavaScriptMicrotasks
0 likes · 17 min read
Understanding the JavaScript Event Loop in Browsers and Node.js
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Oct 23, 2018 · Frontend Development

Mastering JavaScript Macrotasks, Microtasks, and Promise Timing

This article explains the differences between macrotasks and microtasks in the JavaScript event loop, shows how they affect Promise execution, provides practical code examples, and discusses how frameworks like Vue implement task scheduling, helping developers avoid dead‑loops and improve performance.

FrontendJavaScriptMicrotasks
0 likes · 13 min read
Mastering JavaScript Macrotasks, Microtasks, and Promise Timing
MaoDou Frontend Team
MaoDou Frontend Team
Jul 14, 2018 · Frontend Development

Mastering JavaScript Event Loop: Microtasks, Macrotasks, and Async Tricks

This article thoroughly explains JavaScript's single‑threaded nature and Event Loop, detailing how synchronous and asynchronous tasks are queued as macro‑tasks or micro‑tasks, and demonstrates their behavior with code examples, diagrams, and analysis of setTimeout, setInterval, Promise and process.nextTick.

AsyncJavaScriptMicrotasks
0 likes · 11 min read
Mastering JavaScript Event Loop: Microtasks, Macrotasks, and Async Tricks