[tracker/batch-signal: 1/4] tracker-store: Always stop signal timeout after handling it



commit 62e198692742683aafaaea398d25c76b5cef1300
Author: Jürg Billeter <j bitron ch>
Date:   Tue May 10 14:46:33 2011 +0200

    tracker-store: Always stop signal timeout after handling it
    
    If a later commit needs the timeout, it will be enabled again in
    on_statements_committed.

 src/tracker-store/tracker-resources.vala |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/src/tracker-store/tracker-resources.vala b/src/tracker-store/tracker-resources.vala
index ae1355a..9bdbc6e 100644
--- a/src/tracker-store/tracker-resources.vala
+++ b/src/tracker-store/tracker-resources.vala
@@ -215,12 +215,8 @@ public class Tracker.Resources : Object {
 	}
 
 	bool on_emit_signals () {
-		bool had_any = false;
-
 		foreach (var cl in Tracker.Events.get_classes ()) {
-			if (emit_graph_updated (cl)) {
-				had_any = true;
-			}
+			emit_graph_updated (cl);
 		}
 
 		/* Reset counter */
@@ -230,7 +226,6 @@ public class Tracker.Resources : Object {
 		var writebacks = Tracker.Writeback.get_ready ();
 
 		if (writebacks != null) {
-			had_any = true;
 			var builder = new VariantBuilder ((VariantType) "a{iai}");
 
 			var wb_iter = HashTableIter<int, GLib.Array<int>> (writebacks);
@@ -256,11 +251,8 @@ public class Tracker.Resources : Object {
 
 		Tracker.Writeback.reset_ready ();
 
-		if (!had_any) {
-			signal_timeout = 0;
-		}
-
-		return had_any;
+		signal_timeout = 0;
+		return false;
 	}
 
 	void on_statements_committed (bool start_timer) {



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