摘要: 在nodejs中,process.nextTick()可以说是个绕不开的地方,不然你都不好意思跟别人说你已经懂了nodejs的异步非阻塞特性了。简介首先开听听nodejs中对nextTick的解释:On the next loop around the event loop call this callback. This is not a simple alias to setTimeout(fn, 0), it's much more efficient可以清楚得看到,nextTick()达到的效果跟setTimeout(fn, 0)是一样,但为什么nextTick()会比setT 阅读全文
posted @ 2013-03-31 16:52 lengyuhong 阅读(7437) 评论(0) 推荐(0) 编辑