mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-05 23:48:44 +02:00
improve thread safety in GDelayedSettingsBackend
- hold a lock while accessing the tree of delayed values - use weak reference counts with the owner object to avoid doing g_object_notify on a dead object - dispatch the "has-unapplied" notify to the proper main context
This commit is contained in:
@@ -410,7 +410,9 @@ g_settings_delay (GSettings *settings)
|
||||
return;
|
||||
|
||||
settings->priv->delayed =
|
||||
g_delayed_settings_backend_new (settings->priv->backend, settings);
|
||||
g_delayed_settings_backend_new (settings->priv->backend,
|
||||
settings,
|
||||
settings->priv->main_context);
|
||||
g_settings_backend_unwatch (settings->priv->backend, G_OBJECT (settings));
|
||||
g_object_unref (settings->priv->backend);
|
||||
|
||||
|
Reference in New Issue
Block a user