Re: Threads question




Mark Volpe <volpe.mark@epamail.epa.gov> writes:

> If I use glib with G_THREADS_IMPL_POSIX,
> am I correct in saying that the glib functions
> have built-in locks, and I don't have to use
> my own locks if I'm just accessing a glib object?
> Same for gtk?

See the FAQ for more information. 

Basically, if you call g_thread_init():

 - GLib global data is locked, but not individual data
 - You need to explicitely lock around GTK+ with 
   gdk_thread_enter()/gdk_thread_leave()

Regards,
                                        Owen



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