文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>ACE_Reactor owner() + run_reactor_event_loop()

ACE_Reactor owner() + run_reactor_event_loop()

时间:2010-12-16  来源:LaoLiulaoliu

ACE_Reactor::instance()->run_reactor_event_loop() 放在主线程中,定时器就正常;放在子线程中,定时器就不起作用。
解决方法: set the owner of the reactor to the identity of the thread that runs the event loop
1 int svc()
2 {
3     while(ACE_Reactor::instance()->reactor_event_loop_done() == 0)
4     {
5         ACE_Reactor::instance()->owner( ACE_OS::thr_self() );
6         ACE_Reactor::instance()->run_reactor_event_loop();
7     }
8 }
相关阅读 更多 +
排行榜 更多 +
涂色我贼强安卓版

涂色我贼强安卓版

休闲益智 下载
脑细胞太牛了手机版

脑细胞太牛了手机版

休闲益智 下载
球球的冒险旅途

球球的冒险旅途

休闲益智 下载