summaryrefslogtreecommitdiff
path: root/gdbus
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2016-11-18 16:40:23 -0500
committerColin Walters <walters@verbum.org>2016-11-18 16:46:06 -0500
commit701d19d12d4e0599340c9bd1eb2b3e25a40d780b (patch)
tree4f53f70be6c4b8df1cec30bc9c0698d3bc3a2357 /gdbus
parent102bb4a209e4195cb8fe7bb67406458b6841a8c2 (diff)
downloaddconf-701d19d12d4e0599340c9bd1eb2b3e25a40d780b.tar.gz
gdbus: Work around threading deadlock in glib
See https://bugzilla.gnome.org/show_bug.cgi?id=674885 for more details. What dconf is doing right now provokes this more easily by involving *another* thread in the mix.
Diffstat (limited to 'gdbus')
-rw-r--r--gdbus/dconf-gdbus-thread.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdbus/dconf-gdbus-thread.c b/gdbus/dconf-gdbus-thread.c
index e397e3a..8ed28b5 100644
--- a/gdbus/dconf-gdbus-thread.c
+++ b/gdbus/dconf-gdbus-thread.c
@@ -94,6 +94,10 @@ dconf_gdbus_get_worker_context (void)
{
GMainContext *context;
+ /* Work around https://bugzilla.gnome.org/show_bug.cgi?id=674885 */
+ g_type_ensure (G_TYPE_DBUS_CONNECTION);
+ g_type_ensure (G_TYPE_DBUS_PROXY);
+
context = g_main_context_new ();
g_thread_new ("dconf worker", dconf_gdbus_worker_thread, context);
g_once_init_leave (&worker_context, context);