Thread communication



Hi,

I am using Gtk 1.2. My application main and a communication thread. I spawn
the communication thread just before I call gtk_main. My idea was to emit a
emit a signal int the communication thread, using gtk_signal_emit_by_name.
My GUI is set up to call the appropriate callback routine. 
This works just fine, the callback routine gets called, but the pid for the
callback routine is the same as the pid for the communications thread. I
would have expected that the pid for the callback routine would be the same
as the gtk_main? The fact that the callback routine has a different pid than
gtk_main stops me from performing my tasks in the callback routine. Is there
a way to cause gtk_main to call a callback routine (so the call back has the
same pid as gtk_main) from code (like the callbacks are called on user
input).

Thanks,

Andreas.



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