[omniORB] omniORB and gtk

Duncan Grisby dgrisby@uk.research.att.com
Fri, 23 Jul 1999 10:09:54 +0100


On Friday 23 July, Matt Goodall wrote:

> Stefan Seefeld wrote:

> > No problem. omniORB is fully multithreaded, you can still use your
> > X event loop as it is and process CORBA requests from different threads.
> 
> This is more of a GTK question I suspect but I thought that the X and GTK
> libraries were not thread safe and so should only be called from the thread
> running the X event loop?
> 
> I think what I need is to process the CORBA requests from inside the event
> loop by having the event loop wake up whenever a CORBA request arrives and
> let the CORBA system do its processing at that time, inside the event loop.
> To do that I would have to add input callbacks for any sockets/pipes/file
> descriptors that omniORB is using wouldn't I? Is that even possible with
> omniORB?

omniORB is too fundamentally multi-threaded to be able to do this sort
of single-threaded dispatch. One solution to GTK's lack of thread
support is to have a single X event loop which listens on a pipe as
well as the X fds. When you need to update the GUI due to a CORBA
call, you put something into the pipe to wake the X thread up. It's
ugly, but it works.

HTH,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --