Draft: [th/gobject-no-object-locks-pt1-notify] drop OPTIONAL_BIT_LOCK_NOTIFY instead of `g_datalist_id_update_atomic()`
most times when we take a bit lock (object_bit_lock()
), we then lookup an element from the GDatalist
.
Accessing the GDatalist
requires already to take a bit lock. Use _g_datalist_id_update_atomic()
, which allows us to run a callback while holding the GDatalist
lock. Move the relevant operations inside the callback, and drop the OPTIONAL_BIT_LOCK_NOTIFY.
This is the first part of !3864, which replaces all object_bit_lock()
with _g_datalist_id_update_atomic()
.