摘要: 本文基于node 0.10.22版本关于EventLoop是什么,请看阮老师写的什么是EventLoop本文讲述的是EventLoop中的执行顺序(着重讲setImmediate, setTimeout/setInterval, I/O的顺序)首先看看github上看到的nodejs eventloop 的图解, 来源于https://github.com/joyent/node/issues/6034#issuecomment-30017889(注意图中timers处process.nextTick仍可以优先于timers处执行,可能是图中有遗漏, 任何回调中设置的nextTick都会在回调 阅读全文
posted @ 2013-12-05 18:27 will_kan 阅读(2520) 评论(0) 推荐(0) 编辑