Further Adventures of the Event Loop
summary
Explains how tasks, promises and animation callbacks actually interleave: microtask queue blocks rendering and a demonstrated infinite-promise loop freezes the UI; requestAnimationFrame batches per-frame callbacks; Node differs — the loop runs only while work exists, setImmediate runs before setTimeout(0) and process.nextTick handlers run before promise microtasks; web workers have independent event loops on their own threads; practical fixes shown include splitting work with setTimeout or workers and relying on animation-frame scheduling.
AI-written summary · about
chapters (7)
- 0:00Start
- 1:24What's a task?
- 3:23The Rendering Pipeline
- 11:39Animation Frame Callback Queue
- 15:15Node event loop demo
- 20:18Long running tasks will make your web page run like a wonky cat
- 20:39Node is a bit different
related talks
18mEvent loop and asynchrony in JavaScript
34mJavaScript's Secret Life Between the Ticks
31mThe Event Loop Fairytale
41mThe Eventloop in JavaScript - How does it work?
39mThe event loop fairytale
44mLeveraging the Event Loop for Blazing-Fast Apps!
27mWhen JavaScript takes its coffee break?
27mWhat the heck is the event loop anyway?
