开发者

Which process space do node.js' async calls live in?

When an http request hits node.js and node subsequently dispatches that request asynchronously, in whose pro开发者_如何转开发cess space does that work live (the work being done in the asynch call)?


Same process that accepted request (and same thread). All javascript code and event loop is executed in one tread. Some function calls are dispatched internally via thread pool but "userspace" (e.i your javascript code) always run in single thread

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜