Skip to content

Draft: [th/gobject-no-object-locks-pt1-notify] drop OPTIONAL_BIT_LOCK_NOTIFY instead of `g_datalist_id_update_atomic()`

Thomas Haller requested to merge th/gobject-no-object-locks-pt1-notify into main

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().

Merge request reports