[omniORB] Motif - 2nd try

Gary D. Duzan gdd0@gte.com
Tue, 27 Apr 1999 13:35:10 -0400


   I (fortunately) haven't had to deal with the issue myself, but as I
understand it X11R6 and Motif 2.x should be thread-safe. Otherwise,
yes, you have to do all the fun to communicate with an event loop
thread. I have personally done some work using my own mutex-protected
message queues to communicate with a thread running unsafe code, and
I'll be quite happy if I don't have to do it again.

					Gary Duzan
					GTE Laboratories



In Message <199904271721.SAA27372@pineapple.cam-orl.co.uk> ,
   Duncan Grisby <dgrisby@uk.research.att.com> wrote:

=>On Tuesday 27 April, "Loftin, William, CTR" wrote:
=>
=>> I'm looking for any information on how to inter-mix CORBA (omniOrb) and X
=>> (Motif) applications.  I am using UIM/X to build the GUI and need some
=>> assistance and advice with the CORBA aspects.. what the hooks are and where
=>> they are placed within the X client.  I have seen the Orbix example but thi
s
=>> is not the type of interface I am looking for.  Buy all appearances I need
=>> the GUI to look like a typical CORBA client. 
=>
=>omniORB differs from some other ORBs in that it is fully
=>multi-threaded. It does not have a single event loop that you can hook
=>into. The way to use X in conjunction with omniORB is to have a
=>separate thread to perform the X event loop.
=>
=>Of course, this means that you have to be very careful to access X in
=>a thread-safe way. Some versions of Xlib have an XInitThreads()
=>function which makes them thread-safe; others do not. I don't know if
=>Motif is thread-safe. To interrupt the X event loop from a CORBA call,
=>you can either use XSendEvent() if your Xlib is thread-safe, or create
=>a pipe for the X event loop to select on. Then, the CORBA operation
=>can put some data on the pipe to break free from the X event loop.
=>
=>HTH,
=>
=>Duncan.
=>
=>-- 
=> -- Duncan Grisby  \  Research Engineer  --
=>  -- AT&T Laboratories Cambridge          --
=>   -- http://www.uk.research.att.com/~dpg1 --
=>