[evolution-data-server/gnome-2-32] Bug #631804 - Aborts with pthread error in imapx_server_dispose()



commit 7231e71c4a7721045f40fbe0303b4a4fc6247816
Author: David Woodhouse <David Woodhouse intel com>
Date:   Mon Nov 8 15:05:19 2010 +0100

    Bug #631804 - Aborts with pthread error in imapx_server_dispose()

 camel/providers/imapx/camel-imapx-server.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 859cf48..fef2c73 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -4819,6 +4819,14 @@ imapx_server_constructed (GObject *object)
 	if (class->tagprefix > 'Z')
 		class->tagprefix = 'A';
 }
+
+static gboolean
+join_helper (gpointer thread)
+{
+	g_thread_join (thread);
+	return FALSE;
+}
+
 static void
 imapx_server_dispose (GObject *object)
 {
@@ -4833,7 +4841,10 @@ imapx_server_dispose (GObject *object)
 	QUEUE_UNLOCK(server);
 
 	if (server->parser_thread) {
-		g_thread_join (server->parser_thread);
+		if (server->parser_thread == g_thread_self ())
+			g_idle_add (&join_helper, server->parser_thread);
+		else
+			g_thread_join (server->parser_thread);
 		server->parser_thread = NULL;
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]