ORBit2 problem in threaded app



Hi,

I'm writing an application which uses threads, GTK+ and ORBit2. I
started by writing the ORBit2 portions, then the threaded ones and
finally added the GTK+ part. Until I added the GTK+ portion everything
worked fine. All CORBA calls are made from the main thread which also
contains the majority of the GTK+ code. A separate thread reads
asynchronous messages from a socket, and updates a label in the GTK+
interface.

Everything works fine until I try to make a CORBA call in the main
thread. The ORBit2 call blocks in __pthread_sigsuspend() according to a
backtrace, and never returns. I think I have the relevant GLib and GDK
thread calls setup correctly, so can anyone shed any light on why my
CORBA calls never return?

Simplified outline of my application:

int
main(int argc, char *argv[])
{
   g_thread_init(NULL);

   events_init(); /* setup socket listener */

   gdk_threads_init();

   gtk_init(&argc, &argv);

   create_interface(); /* interface has callbacks with CORBA calls */

   gdk_threads_enter();

   events_start(events); /* process events */

   gtk_main();

   gdk_threads_leave();

   return 0;
}

void
handle_event(void)
{
   gdk_threads_enter();
   gtk_label_set_text(interface->label, "Receieved event");
   gdk_threads_leave();
}




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]