[gnome-keyring] [daemon] Possible fix for intermittent deadlock.



commit 272fec194df174be437f49f94d2dbd82d2e66efb
Author: Stef Walter <stef memberwebs com>
Date:   Sun Sep 13 22:44:36 2009 +0000

    [daemon] Possible fix for intermittent deadlock.
    
    Do the flag intercharge closer to when poll is actually called
    in case the cleanup_done_threads() results in other threads
    running.

 daemon/util/gkr-daemon-async.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/daemon/util/gkr-daemon-async.c b/daemon/util/gkr-daemon-async.c
index c80886a..207982d 100644
--- a/daemon/util/gkr-daemon-async.c
+++ b/daemon/util/gkr-daemon-async.c
@@ -97,6 +97,9 @@ async_poll_func (GPollFD *ufds, guint nfsd, gint timeout)
 	
 	g_assert (orig_poll_func);
 
+	if (done_queue && !g_queue_is_empty (done_queue))
+		cleanup_done_threads ();
+
 	/* 
 	 * These two atomic variables are interlocked in the 
 	 * opposite order from those in DO_LOCK which prevents
@@ -105,9 +108,6 @@ async_poll_func (GPollFD *ufds, guint nfsd, gint timeout)
 	g_atomic_int_set (&waiting_on_poll, 1);
 	if (g_atomic_int_get (&waiting_on_lock))
 		timeout = 0;
-
- 	if (done_queue && !g_queue_is_empty (done_queue))
- 		cleanup_done_threads ();
  	
 	ret = (orig_poll_func) (ufds, nfsd, timeout);
 



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