Tag

Microtask

1 views collected around this technical thread.

Fulu Network R&D Team
Fulu Network R&D Team
Aug 10, 2021 · Frontend Development

Implementing Zero-Delay Timers in JavaScript: Alternatives to setTimeout

This article explores why the native setTimeout cannot achieve a true 0 ms delay, presents a postMessage‑based zero‑timeout implementation, and compares several asynchronous JavaScript techniques—including queueMicrotask, async/await, and MessageChannel—showing their performance advantages over setTimeout.

JavaScriptMessageChannelMicrotask
0 likes · 7 min read
Implementing Zero-Delay Timers in JavaScript: Alternatives to setTimeout
Taobao Frontend Technology
Taobao Frontend Technology
Jun 17, 2021 · Frontend Development

Why JavaScript Has an Event Loop: Origins and Browser vs Node.js Differences

This article explores the historical reasons behind JavaScript's event loop, explains the task and microtask queues, compares browser and Node.js implementations, and provides concrete code examples to illustrate how tasks are scheduled and executed across environments.

JavaScriptMicrotaskNode.js
0 likes · 17 min read
Why JavaScript Has an Event Loop: Origins and Browser vs Node.js Differences
37 Interactive Technology Team
37 Interactive Technology Team
May 9, 2020 · Frontend Development

Understanding Asynchronous Programming in JavaScript: Event Loop, Tasks, and Promise Implementation

The article explains JavaScript’s single‑threaded nature and how asynchronous programming—using callbacks, timers, Ajax, and Promises—relies on the event loop to manage macro‑tasks and micro‑tasks, illustrates execution order, warns against callback hell, and provides a custom Promise implementation.

JavaScriptMicrotaskPromise
0 likes · 14 min read
Understanding Asynchronous Programming in JavaScript: Event Loop, Tasks, and Promise Implementation