GObject thread safety



Hi Tim,

	Just reading through gobject.c I was wondering, what attempt
if any is there to ensure correct tracking of object->ref_count ? eg.
g_object_unref seems to make no effort to ensure that the ref count is
consistant with any other threads performing the operation at the same
time.

	I mean - I can see a performance case for it; but, it seems to
me that g_object_ref / unref not being thread safe implies that an
object can only possibly be 'used' - properties set / got, signals
emitted (g_object_set_value) etc. from a single thread.

	Is it then the case that only the type system is thread safe ?

	Oh - and the type system locking still shows as the most
significant thing on my (UI handler) profile, it would be good to be
able to propagate lifecycle invariants from instance to type to avoid
needing to do so much locking. Alex' patch does this well - can we
expect to see that soon ?

	Regards,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot




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