From d95030a2fd1f4abb8dad623bdf7962fa902df8d6 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Sat, 30 Apr 2016 15:09:43 -0700 Subject: [PATCH] task: avoid context lock when setting source name If you set the source name after attaching to the context, you have to lock the context to free/assign the new source name. https://bugzilla.gnome.org/show_bug.cgi?id=765861 --- gio/gtask.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/gtask.c b/gio/gtask.c index 0318d9736..5a1cfab4c 100644 --- a/gio/gtask.c +++ b/gio/gtask.c @@ -1170,8 +1170,8 @@ g_task_return (GTask *task, /* Otherwise, complete in the next iteration */ source = g_idle_source_new (); - g_task_attach_source (task, source, complete_in_idle_cb); g_source_set_name (source, "[gio] complete_in_idle_cb"); + g_task_attach_source (task, source, complete_in_idle_cb); g_source_unref (source); }