Re: support for threads?
- From: Havoc Pennington <rhpennin midway uchicago edu>
- To: Todd Graham Lewis <tlewis mindspring net>
- cc: Jeff Garzik <jgarzik pobox com>, gnome-list gnome org
- Subject: Re: support for threads?
- Date: Sat, 31 Oct 1998 14:42:20 -0600 (CST)
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]