Re: Question about new functions in GDK 2.11



On Thu, 2007-06-07 at 00:42 +0200, Tomasz Jankowski wrote:
> Hi!
> 
> My question isn't really important, I'm only curious ;P
> 
> Why did you add functions below to GDK?
> 
> gdk_threads_add_idle
> gdk_threads_add_idle_full
> gdk_threads_add_timeout
> gdk_threads_add_timeout_full
> If we write multi thread aplication in GTK+ we surround gtk_main ()
> function with gdk_threads_enter () and gdk_threads_leave (), so any
> call of g_idle_add... or g_timeout... functions will be automatically
> thread safe, am I right? 
> 
> Can someone explain it for me?

No, that is not true. All Gtk+ callbacks and signals will have the gdk
lock taken, but idles and timeouts need to call gdk_threads_enter()
manually.

Plus there is the race matthias explained.





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