Re: support for threads?




On Sat, 31 Oct 1998, Todd Graham Lewis wrote:
> On Sat, 31 Oct 1998, Jeff Garzik wrote:
> 
> > Are all of these libs thread-safe?
> 
> Theoretically yes, but no one is really sure, since I don't think anyone
> has done any multi-threaded GNOME programming.  Give it a shot and send
> in bug reports!
> 

If you don't build Gtk with thread support, it's totally unsafe.

If you do, it looks to me (from gtk/testthreads.c) like each thread has to
call gdk_threads_enter()  before making GUI calls, and gdk_threads_leave()
afterward. i.e., only one thread can be doing Gtk stuff at a time.

Also, lots of the functions in Gtk and Gnome are not reentrant. If any
are it is probably pure coincidence.

You'll save yourself lots of headaches if you keep the whole GUI in a
single thread. You said you're doing this anyway, so no problem. :-)

Havoc




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