JavaScript's Secret Life Between the Ticks
summary
Covers how the event loop actually schedules work: call stack → Web APIs → queues (microtask vs task vs rAF) and shows a live demo where an infinite promise loop microtasks (promises) freeze the page while setTimeout and requestAnimationFrame keep CSS animations responsive. Notes setTimeout has a ~4ms minimum so timers can fire ~250Hz versus rAF tied to display refresh (120Hz on the demo machine). Mentions queueMicrotask, process.nextTick, requestIdleCallback and scheduler.postTask priorities.
AI-written summary · about
chapters (18)
- 0:00JavaScript event loop intro
- 3:24Single-threaded basics
- 4:07Sync vs async tasks
- 6:12Event loop callbacks
- 10:24DOM updates delays
- 13:16Async execution order
- 16:06Promise vs setTimeout
- 17:29Promise timing
- 19:55Blocking main thread
- 21:03Task queues & animation
- 22:51Microtask vs task vs animation
- 23:12Demo blocking event loop
- 25:18Microtask tips
- 27:04Resources & frameworks
- 27:44Q&A async errors
- 29:31Async pitfalls
- 31:37Optimizing async ops
- 33:22Closing remarks








