Understanding the node event loop