by tankenmate · 10y ago · 0 comments
Because of the way tasks are scheduled in node.js you can have head of line blocking; i.e. a task that is scheduled to run first can block all the subsequent tasks, the issue that the OP suffered from. You can sometimes reduce this by calling process.nextTick(), but you need to remember that it is only IO is non-blocking in node.js.[1]
[0] https://stackoverflow.com/questions/14409609/does-the-v8-jav...
[1] http://greenash.net.au/thoughts/2012/11/nodejs-itself-is-blo...