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:
Ryan Lortie
2010-05-16 16:56:36 -04:00
parent 61219e2640
commit 799e0242ae
5 changed files with 121 additions and 24 deletions

View File

@@ -60,9 +60,8 @@ G_GNUC_INTERNAL
GType g_delayed_settings_backend_get_type (void);
G_GNUC_INTERNAL
GDelayedSettingsBackend * g_delayed_settings_backend_new (GSettingsBackend *backend,
gpointer owner);
G_GNUC_INTERNAL
void g_delayed_settings_backend_disown (GDelayedSettingsBackend *backend);
gpointer owner,
GMainContext *owner_context);
G_GNUC_INTERNAL
void g_delayed_settings_backend_revert (GDelayedSettingsBackend *delayed);
G_GNUC_INTERNAL