[evolution-data-server] Bug #697598 - [imapx] Freeze due to calling thread join from main thread
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug #697598 - [imapx] Freeze due to calling thread join from main thread
- Date: Thu, 27 Jun 2013 14:39:01 +0000 (UTC)
commit c98e72652b241b719f61f817e45253e7c1aa5deb
Author: Milan Crha <mcrha redhat com>
Date: Thu Jun 27 16:37:48 2013 +0200
Bug #697598 - [imapx] Freeze due to calling thread join from main thread
camel/camel-imapx-server.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/camel/camel-imapx-server.c b/camel/camel-imapx-server.c
index d436bdb..2332e93 100644
--- a/camel/camel-imapx-server.c
+++ b/camel/camel-imapx-server.c
@@ -6968,11 +6968,11 @@ imapx_parser_thread (gpointer d)
return NULL;
}
-static gboolean
+static gpointer
join_helper (gpointer thread)
{
g_thread_join (thread);
- return FALSE;
+ return NULL;
}
static void
@@ -7044,12 +7044,12 @@ imapx_server_dispose (GObject *object)
QUEUE_UNLOCK (server);
if (server->parser_thread) {
- if (server->parser_thread == g_thread_self ())
- /* Prioritize ahead of GTK+ redraws. */
- g_idle_add_full (
- G_PRIORITY_HIGH_IDLE,
- &join_helper, server->parser_thread, NULL);
- else
+ if (server->parser_thread == g_thread_self ()) {
+ GThread *thread;
+
+ thread = g_thread_new (NULL, join_helper, server->parser_thread);
+ g_thread_unref (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]