Rebuilding Node’s Event Loop

1 · Marc-André Cournoyer · June 25, 2013, midnight
I am a big believer in mastering your tools to become a better developer. And the best way to master your tools is to understand how they are made. Do you know what’s happening inside Node.js or EventMachine? There’s an event loop. So there must be a loop somewhere, right? A loop handling events. Let’s take a look… The Loop Event loops like the one in Node or EventMachine are designed to react to I/O events. This could be an incoming connection, data arriving on a socket, etc. What’s more, it mu...