Understanding the NodeJS event loop myths and magic
summary
Explains how Node.js is single‑threaded at the JavaScript level while offloading blocking I/O to libuv thread pool of 4 by default, lists event loop phases (timers, pending callbacks, poll, check, close), and shows concrete differences: setTimeout uses a minimum delay and can be delayed by the call stack, setImmediate runs after the poll phase, and process.nextTick vs setImmediate schedules callbacks before the next loop or after the current poll respectively; clarifies that EventEmitter is unrelated to the event loop.
AI-written summary · about
chapters (6)
- 0:00Start
- 3:30What Is Event Loop
- 7:33What Is a Synchronous in Node Js
- 9:08The Event Loop
- 12:56The Difference between Set Time Set Immediate and Set Timeout
- 27:5810 Minute Break
related talks
21mThe Node.js Eventloop Fairytale
34mEverything I Thought I Knew about the Event Loop Was Wrong
31mNodeJs Event Loop
45mAsk the Maintainer: Nodejs
49mA Journey into Node.js Internals
12mFoundations of Node.js
22mScaling Node.js and unblocking the Event Loop
20mAfter Years of Node in Production, We Still Block the Event Loop
