Understanding the node.js event loop