diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2017-11-25 13:19:44 +0100 |
---|---|---|
committer | Sam Thursfield <sam@afuera.me.uk> | 2018-07-16 21:12:04 +0200 |
commit | 8d6e69837a32406b73018ce83d760c79ff82f06e (patch) | |
tree | 5fe890132e2a82073d07320cb8adf3f8249d957f /src/tracker-store/tracker-resources.vala | |
parent | 680fd0de3983da4101af18c1b0eb797fa9621614 (diff) | |
download | tracker-8d6e69837a32406b73018ce83d760c79ff82f06e.tar.gz |
tracker-store: Protect event batches with a mutex
While the pending data and event counter are only accessed by
the updates thread, the ready events will be potentially accessed
by both the updates and the dbus thread.
That said, chances of locking will be minimal, since the
get_pending() call only happens once a second (by default) or after
the pending buffer grew big enough.
Diffstat (limited to 'src/tracker-store/tracker-resources.vala')
-rw-r--r-- | src/tracker-store/tracker-resources.vala | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/tracker-store/tracker-resources.vala b/src/tracker-store/tracker-resources.vala index 0635b4f23..9d9b83c18 100644 --- a/src/tracker-store/tracker-resources.vala +++ b/src/tracker-store/tracker-resources.vala @@ -236,9 +236,6 @@ public class Tracker.Resources : Object { } } - /* Reset counter */ - Tracker.Events.get_total (true); - /* Writeback feature */ var writebacks = Tracker.Writeback.get_ready (); @@ -289,7 +286,7 @@ public class Tracker.Resources : Object { void check_graph_updated_signal () { /* Check for whether we need an immediate emit */ - if (Tracker.Events.get_total (false) > GRAPH_UPDATED_IMMEDIATE_EMIT_AT) { + if (Tracker.Events.get_total () > GRAPH_UPDATED_IMMEDIATE_EMIT_AT) { // possibly active timeout no longer necessary as signals // for committed transactions will be emitted by the following on_emit_signals call // do this before actually calling on_emit_signals as on_emit_signals sets signal_timeout to 0 |