[omniORB] How to gracefully terminate orb->run() from another thread ?

Andrey Koubychev email@vtc.ru
Thu, 7 Mar 2002 14:17:51 +0100


Hello Developers,

  How to gracefully terminate orb->run() from another thread ?
  The problem is that i try to write small ATL component for
  interaction VB with Corba.
  In myATLObject.Init I init orb,create POA , create object, activate object
  on this POA and then spawns a new thread (because I should return to
  VB) with &orb as param, this thread does only 1 thing - orb->run()
  and this works until that moment.
  Now I should think about time when object is destroyed. I should
  clear and destroy all what I have created. I dont know where should
  I start :) Simple doing orb->destroy() from another threads probably
  waiting for completition of orb->run() in 1st thread .
  If this important, orb was created and trying to be
  destroyed from the same thread. This conclusion comes from COM model.
  The problem is that it runs in another one :)
  Can you guys givbe me an advice how to organize all this
  intertechnology binding ? :) Maybe I can fire some internal event or
  maybe I should add some special code to omniorb srcs ? Just give me
  an idea ! :)
  I use OMNIORB 3.02 dynamically linked on NT4
  
-- 
Best regards,
Koubychev Andrey                          mailto:email@vtc.ru