dconf/gtype-threads.patch
2017-03-21 15:43:49 -04:00

31 lines
1.0 KiB
Diff

From 701d19d12d4e0599340c9bd1eb2b3e25a40d780b Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Fri, 18 Nov 2016 16:40:23 -0500
Subject: 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.
---
gdbus/dconf-gdbus-thread.c | 4 ++++
1 file changed, 4 insertions(+)
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);
--
cgit v0.12