Watch
What the heck is the event loop anyway? | Philip Roberts | JSConf EU
Visualizes the call stack, callback queue and event loop, showing exactly why one synchronous CPU-heavy call blocks every other request.
Engineering Fundamentals for the Agent Era
Contents Section 3, The Machine
A blocking call inside an async handler that stalls every other request on the event loop.
A type-checker escape hatch (an any type, a forced cast, an ignore comment) that silences a real error instead of fixing it.
An object mutated while other code still holds a reference to it, so a change in one place shows up somewhere unrelated.
An unbounded in-memory cache or a closure holding large objects, leaking memory until the process is killed.
How source code becomes running behavior: parsing, compilation, interpretation, type systems, memory management and concurrency models.
An agent wrote an async upload handler that hashes each file with a synchronous, CPU-heavy function and stores results in a module-level map with no size limit. Find why response times spike for every user during uploads and why memory climbs until the process restarts.
Watch
Visualizes the call stack, callback queue and event loop, showing exactly why one synchronous CPU-heavy call blocks every other request.
Explains manual allocation versus tracing garbage collection and reachability, which is why an object still referenced from a module-level map or closure is never freed.
Argues that shared mutable state tangles unrelated parts of a program, and makes the case for values and immutability that underlies the functional paradigm.
Builds a tree-walking interpreter and then a bytecode VM with closures and a garbage collector, turning parsing, compilation and runtimes into something you have implemented.
Concrete items on what the type checker can and cannot prove, why any and type assertions hide real errors, and how to design types that rule out invalid states.
Its ownership and borrowing chapters teach stack versus heap and when memory is freed more clearly than any GC-language text, and it includes a full chapter on async.
Manual
Official guidance on why synchronous crypto, compression, JSON and regex work stalls all clients, and how to partition or offload it, which is the drill's upload-handler bug.
Manual
Defines the event loop phases and the ordering of timers, setImmediate, process.nextTick and promise callbacks, needed to predict output order.