From: Yuan X. <xuy...@gm...> - 2007-03-15 12:19:43
|
Hi again, when I let the agent control in the main thread, and other loops in the new thread, it works! It seems that the ruby need the initialization in the new thread, is it? 2007/3/15, Yuan Xu <xuy...@gm...>: > Hi all, > > I tried again today, but it still does not work. > > Firstly, I create a global mutex that all ruby functions should call > before doing anything. > But it will cause dead lock, because there are recursive calls between > Ruby and C++. > > And then, I make the whole run loop in a single thread, but not the > main thread, ie. > After the initialization, the main thread create a new thread. > The new thread run the simulation loops, > while the main thread do nothing. > However the strange phenomenon remains ;-( > > Do you have any suggestion? > > > -- > Best wishes! > > Xu Yuan > School of Automation > Southeast University, Nanjing, China > > mail: xuy...@gm... > xy...@ya... > web: http://xuyuan.cn.googlepages.com > -------------------------------------------------- > > -- Best wishes! Xu Yuan School of Automation Southeast University, Nanjing, China mail: xuy...@gm... xy...@ya... web: http://xuyuan.cn.googlepages.com -------------------------------------------------- |