Re: GTK and threaded applications

2006-02-03 Thread kornelix
I last reported that GTK was making my multi-threaded application run as multiple single threads, one after the other. It was suggested to lock only the GTK calls instead of the whole thread. I tried this. I wrapped the individual GTK calls as follows: gdk_threads_enter(); do GTK

Re: GTK and threaded applications

2006-02-03 Thread Daniel Atallah
On 2/3/06, kornelix [EMAIL PROTECTED] wrote: I last reported that GTK was making my multi-threaded application run as multiple single threads, one after the other. It was suggested to lock only the GTK calls instead of the whole thread. I tried this. I wrapped the individual GTK calls as

Re: GTK and threaded applications

2006-02-03 Thread Brian J. Tarricone
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2/3/2006 2:14 PM, kornelix wrote: I last reported that GTK was making my multi-threaded application run as multiple single threads, one after the other. It was suggested to lock only the GTK calls instead of the whole thread. I tried this. I

Re: GTK and threaded applications

2006-02-03 Thread Tor Lillqvist
FYI, here is something I pulled from the Microsoft web site on Win32 programming with threads. That's a bit irrelevant: the Win32 API doesn't need to run on different architectures, different OSes, and with different graphics-drawing backends. Indeed. And actually, I was a bit

Re: GTK and threaded applications

2006-02-01 Thread kornelix
Thanks for your generous help. I will try Michael's suggestion and see how it works. I would like to implement all GTK calls in the main program as Tristan suggested, but this seems to be very complex (must implement asynch. queues of data going back and forth between threads and main(),

Re: GTK and threaded applications

2006-02-01 Thread Michael L Torrie
On Wed, 2006-02-01 at 10:44 +0100, kornelix wrote: Thanks for your generous help. I will try Michael's suggestion and see how it works. I would like to implement all GTK calls in the main program as Tristan suggested, but this seems to be very complex (must implement asynch. queues of

Re: GTK and threaded applications

2006-01-31 Thread Tristan Van Berkom
kornelix wrote: Following the guidelines in the FAQ, I constructed my application threads as follows: gdk_threads_enter();// enter thread (do some work, including GTK calls) gdk_flush();// exit thread gdk_threads_leave(); return 0;

Re: GTK and threaded applications

2006-01-31 Thread Michael L Torrie
On Tue, 2006-01-31 at 18:28 +0100, kornelix wrote: Following the guidelines in the FAQ, I constructed my application threads as follows: gdk_threads_enter();// enter thread (do some work, including GTK calls) gdk_flush();// exit