[th/gobject-notify-queue] rework locking in `GObject` around `GObjectNotifyQueue`
Access to GData already takes a mutex.
Use g_datalist_id_update_atomic()
, which takes a callback and allows to perform more complex operations while holding that lock.
That allows to drop object_bit_lock (object, OPTIONAL_BIT_LOCK_NOTIFY)
for locking around GObjectNotifyQueue
.
Also, don't use a GSList
but reallocate/grow the GObjectNotifyQueue
buffer.
This is the first part. The follow up is !3864 which reworks more uses of object_bit_lock()
.
Edited by Thomas Haller