Asynchrony: Under the Hood
summary
Shows concrete engine-level behavior: event loop diagrams, microtask queue behavior, and why run-to-completion matters. Compares callbacks, Promises, generators and async/await with code that demonstrates sequential vs concurrent awaits and a rewrite using Promise.all to run requests in parallel. Demonstrates error surfaces — swallowed rejections, stack traces, and generator throw semantics — and measures where microtask loops can starve ticks. Useful if wanting actionable tradeoffs, exact pitfalls, and working rewrites rather than vague prose.
AI-written summary · about








