=?utf-8?q?=5Bfolks=5D_aggregator=3A_Don=E2=80=99t_prematurely_reach_quies?= =?utf-8?q?cence?=



commit f032c7afaf86fba46dca272cf973a89a78208d56
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sun Jun 24 18:15:41 2012 +0100

    aggregator: Donât prematurely reach quiescence
    
    If one of the backends loads very fast, but doesnât signal the addition of
    any persona stores for a while, the IndividualAggregator will prematurely
    reach quiescence. We now force quiescence to be reached at least after all
    the backends have finished loading.

 folks/individual-aggregator.vala |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
index 91fa813..94207e0 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -513,6 +513,11 @@ public class Folks.IndividualAggregator : Object
             {
               this._prepare_pending = true;
 
+              /* Temporarily increase the non-quiescent backend count so that
+               * we don't prematurely reach quiescence due to odd timing of the
+               * backend-available signals. */
+              this._non_quiescent_backend_count++;
+
               this._backend_store.backend_available.connect (
                   this._backend_available_cb);
 
@@ -529,6 +534,8 @@ public class Folks.IndividualAggregator : Object
                * all of them.) */
               yield this._backend_store.load_backends ();
 
+              this._non_quiescent_backend_count--;
+
               this._is_prepared = true;
               this.notify_property ("is-prepared");
 



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