[folks] core: Improve quiescence timeout



commit 910d6c295cd4aaccc781314933ce62d5c5dc66b6
Author: Philip Withnall <philip tecnocode co uk>
Date:   Mon Mar 19 19:02:05 2012 +0000

    core: Improve quiescence timeout
    
    Ensure that we start the timeout in the case that all backends are marked
    as quiescent (meaning that they've added all their persona stores), but none
    of the persona stores are.

 folks/individual-aggregator.vala |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
index aa3aeaa..1b8b71b 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -771,6 +771,15 @@ public class Folks.IndividualAggregator : Object
       if (store.is_quiescent == false)
         {
           this._non_quiescent_persona_store_count++;
+
+          /* Start the timeout to force quiescence if the backend (or its
+           * persona stores) misbehave and don't reach quiescence. */
+          if (this._quiescent_timeout_id == 0)
+            {
+              this._quiescent_timeout_id =
+                  Timeout.add_seconds (this._QUIESCENT_TIMEOUT,
+                      this._quiescent_timeout_cb);
+            }
         }
 
       /* Handle any pre-existing personas in the store. This can happen if the



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