The Node.js Event Loop — How JavaScript Handles Async on a Single Thread
· 9 min read
JavaScript is single-threaded. One thread, one call stack, one thing at a time. And yet, Node.js handles thousands of concurrent connections without breaking a sweat. That seems like a contradiction — so how does it actually work?
The answer is the event loop.