[omniORB] Odd behavior on linux with NPTL

Duncan Grisby duncan at grisby.org
Thu Nov 16 10:07:46 GMT 2006


On Friday 10 November, Arne Pajunen wrote:

> I start a separate thread (pthreads, behaves the same if i use
> omnithreads for it, or call omni_thread::create_dummy()) which just
> runs orb->run();

There's never any need to do that. Unless you call it from the main
thread, orb->run() just blocks doing nothing. omniORB uses its own
threads to dispatch incoming calls, so you don't need to call run().

> when the applications terminates with exit(0); the destructor of
> omni_condition throws a exception

That's just because the thread doing run() is blocked on the condition
variable, and exiting deletes it. You should either not call orb->run(),
or call orb->destroy() to unblock any threads in run().

Cheers,

Duncan.

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



More information about the omniORB-list mailing list