mina框架为什么能实现高并发

 我来答
钟欣荣zxr7
2016-09-24 · TA获得超过377个赞
知道小有建树答主
回答量:326
采纳率:0%
帮助的人:380万
展开全部

mina框架为什么能实现高并发

Running Concurrently

Running a JavaScript function in the background is easy with Er.js:
Er.spawn(myBackgroundFunction);

Er.spawn starts a new Er.js process running
myBackgroundFunction, and returns its process id.  

Because processes are really coroutines, you have to call yield
before any function which might block.  Calling yield will create a
continuation trampoline that can be rerun by Er.js when it’s time for the
process to continue executing.  For example:
function myBackgroundFunction() {
   // Wait for 4 seconds
   yield Er.sleep(4000);
   // Do other things…
}
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式