[omniORB] Multithreading and OMNI

Giga Giguashvili gregoryg@ParadigmGeo.com
Wed, 25 Jul 2001 13:37:19 +0200


Hi,

I have an application, which is a client and a server at the same time.
The server functionality is performed in the main thread, while client
functionality is performed in a dedicated thread created specially for
this purpose.

I used another ORB implementation before and for several reasons I
created two ORB objects (called ORB_init twice) in the same
applications. One of them was initialized to be the server and the
second one was a client. This worked fine before I started to use OMNI.

The problem is that any of the threads can call exit function, but
before they try to perform some cleanup in CORBA to tell the other
thread that the application is exiting. The problem in OMNI is that
threads get stuck in ORB::destroy method waiting for some objects to be
destroyed...

I have the following questions:
- What is the best way of using ORB objects in the scenario I described?
Do I have to create two ORB objects or not?
- Is there some known issues regarding the shutdown?->destroy calls in
OMNI, leading to a deadlock or something?

Thanks in advance.
Giga.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Gregory Giguashvili
Senior Software Engineer
Email: gregoryg@ParadigmGeo.com
Tel: 972-9-9709379 Fax: 972-3-9709337
Paradigm Geophysical Ltd.
http://www.math.tau.ac.il/~gregoryg