Re: ref/unref in GObjects thread safe?

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

 



On Wed, 8 Apr 2009 10:09:40 +0200
Aleksander Morgado <gtk-list@xxxxxxxxxxxxx> wrote:
> Are g_object_ref() and g_object_unref() completely thread-safe?
> 
> Cheers,
> -Aleksander

This states that manipulation of the reference count with
g_object_ref() and go_object_unref() is thread-safe as from glib-2.8:
http://library.gnome.org/devel/gobject/stable/gobject-memory.html#gobject-memory-refcount

Although the reference count is thread safe, for concurrent access to
the data members of the same GObject object in different threads, you
would usually need to do your own locking.

Chris

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux