[omniORB] run Orb in separate thread

Duncan Grisby duncan at grisby.org
Fri Mar 31 19:49:09 BST 2006


On Friday 31 March, J-M Epitalon wrote:

> I am new to CORBA and omniORB.
> I try to run the orb in a separate thread. That is, when it is time to
> call orb->run, I call this in a thread main function.
> This causes a SEGV.

There are several problems with your code, some of which you've already
noticed. Another problem is that you should never use _var types or
references to them as argument types, because it will cause the
reference counting to go wrong. That might be another reason for a
segfault.

However, rather than fixing your code, you should just get rid of the
thread altogether. You don't need to call orb->run with omniORB -- it
will happily dispatch requests and so on without it. All your thread is
going to do is block on a mutex inside omniORB until the ORB is shut
down.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list