[10030] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Re: Making GLib thread-safe

daemon@ATHENA.MIT.EDU (Owen Taylor)
Wed Nov 11 22:09:49 1998

To: jgarzik@pobox.com
Cc: gtk-list@redhat.com
From: Owen Taylor <otaylor@redhat.com>
Date: 11 Nov 1998 22:10:08 -0500
In-Reply-To: Jeff Garzik's message of "Wed, 11 Nov 1998 15:12:44 -0500 (EST)"
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com


Jeff Garzik <jgarzik@pobox.com> writes:

> I keep running into GLib thread safety issues coding my current
> GNOME app.
> 
> Has anyone put any work towards making GLib thread-safe?  I'd like
> to start a new CVS branch and push forward towards this goal, unless
> anyone has objections.
> 
> It seems to me like I should only have to define mutexes for each
> static variable.  And if _REENTRANT is not defined, the mutex locks
> evaluate to null calls.
> 
> (I'm searching the gtk-list archives now for glib+thread references)

Such questions (and anything about future work planned for
GTK+) should probably be directed to gtk-devel-list@redhat.com.
There has been some discussion there recently about adding
threading primitives to GLIB, but nothing that I remember
about adding reentrancy to GLIB itself.

(Having reentrancy in GLIB is a little less urgent, since GTK+
is only going to be explicit-locking thread-safe in the
near future, but glib is a pretty useful library, so I
suppose it would be nice to be able to use it in threaded
code without grabbing the global GTK+ lock. 

Some care would have to be done to make sure that this didn't kill
performance - perhaps some resources like the GList free
lists should be per-thread)

Regards,
                                        Owen

-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post