~/talk

A Deep Dive Into the Node js Event Loop

Talkat UtahJS Conf 2022 · on Friday, 2022-09-23· [nodejs]
slides:none on file

Compares browser and Node.js event loops and shows that Node is not a single queue but multiple callback queues tied to phases, which explains the non‑deterministic race between setTimeout(0) and setImmediate; demonstrates that setTimeout is FIFO, setTimeout(0) only defers to the next tick, and that inside fs.readFile callbacks setImmediate consistently runs before timers; shows process.nextTick can starve the loop and that setImmediate vs setTimeout race depends on which phase the loop is in.

AI-written summary · about

  1. 0:00Introduction to event loops
  2. 0:50Browser event loop mechanics
  3. 3:03Synchronous code execution
  4. 5:28Asynchronous timers
  5. 10:40Node.js setImmediate
  6. 14:43Event loop phases
  7. 20:06Process.nextTick mechanics
  8. 25:30Promises and final takeaways
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.