From 7d10deb89ac7e68883fa2286e95036deeab35efc Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 10 Apr 2023 13:57:17 +0200 Subject: libtracker-sparql: Improve threading guarantees of TrackerNotifier Make the TrackerNotifier::events signal ensured to be emitted in the same main context that created the TrackerNotifier. This is coherent with other threaded objects that have communication through signals (e.g. GDBusProxy). Notably, it is already expected to behave this way in tracker-miners. Since the tracker-miner-fs-3 D-Bus endpoint is managed on a distinct context/thread that should also handle the proxying of notifier events without involvement of the main thread/context. --- src/libtracker-sparql/tracker-notifier.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/libtracker-sparql/tracker-notifier.c b/src/libtracker-sparql/tracker-notifier.c index 1ac26e019..f67c7a3d3 100644 --- a/src/libtracker-sparql/tracker-notifier.c +++ b/src/libtracker-sparql/tracker-notifier.c @@ -48,6 +48,9 @@ * Similarly, when receiving an event of type %TRACKER_NOTIFIER_EVENT_UPDATE, * the resource will have already changed, so the data previous to the update is * no longer available. + * + * The [signal@Tracker.Notifier::events] signal is emitted in the thread-default + * main context of the thread where the `TrackerNotifier` instance was created. */ #include "config.h" @@ -79,6 +82,7 @@ struct _TrackerNotifierPrivate { GCancellable *cancellable; TrackerSparqlStatement *local_statement; GAsyncQueue *queue; + GMainContext *main_context; gint n_local_statement_slots; guint querying : 1; guint urn_query_disabled : 1; @@ -381,10 +385,19 @@ tracker_notifier_emit_events (TrackerNotifierEventCache *cache) static void tracker_notifier_emit_events_in_idle (TrackerNotifierEventCache *cache) { - g_idle_add_full (G_PRIORITY_DEFAULT, - (GSourceFunc) tracker_notifier_emit_events, - cache, - (GDestroyNotify) _tracker_notifier_event_cache_free); + TrackerNotifier *notifier = cache->notifier; + TrackerNotifierPrivate *priv; + GSource *source; + + priv = tracker_notifier_get_instance_private (notifier); + + source = g_idle_source_new (); + g_source_set_callback (source, + (GSourceFunc) tracker_notifier_emit_events, + cache, + (GDestroyNotify) _tracker_notifier_event_cache_free); + g_source_attach (source, priv->main_context); + g_source_unref (source); } static gchar * @@ -795,6 +808,7 @@ tracker_notifier_init (TrackerNotifier *notifier) (GDestroyNotify) tracker_notifier_subscription_free); priv->cancellable = g_cancellable_new (); priv->queue = g_async_queue_new (); + priv->main_context = g_main_context_get_thread_default (); } /** -- cgit v1.2.1 From 27bad86ec90586488a26087e4c51caf0808532e7 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 10 Apr 2023 16:02:33 +0200 Subject: libtracker-sparql: Check cancellable more often in TrackerNotifier While handling the URN query cursor, we did not check the cancellable and went all through with it, even if TrackerNotifier finalization paths might have cancelled the task. This could not happen in practice since the cache struct takes a reference on the TrackerNotifier, but will happen with future commits. --- src/libtracker-sparql/tracker-notifier.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/libtracker-sparql/tracker-notifier.c b/src/libtracker-sparql/tracker-notifier.c index f67c7a3d3..63cf0e61f 100644 --- a/src/libtracker-sparql/tracker-notifier.c +++ b/src/libtracker-sparql/tracker-notifier.c @@ -498,7 +498,7 @@ handle_cursor (GTask *task, * extracted from the GSequence, the latter because of the ORDER BY * clause. */ - while (tracker_sparql_cursor_next (cursor, NULL, NULL)) { + while (tracker_sparql_cursor_next (cursor, cancellable, NULL)) { id = tracker_sparql_cursor_get_integer (cursor, 0); event = g_sequence_get (iter); iter = g_sequence_iter_next (iter); @@ -513,6 +513,12 @@ handle_cursor (GTask *task, } tracker_sparql_cursor_close (cursor); + + if (g_task_return_error_if_cancelled (task)) { + _tracker_notifier_event_cache_free (cache); + return; + } + cache->first = iter; if (g_sequence_iter_is_end (cache->first)) { -- cgit v1.2.1 From 113adc173f93089d6c2692a1bbe8a98d66c65c90 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 10 Apr 2023 16:20:04 +0200 Subject: libtracker-sparql: Pass TrackerNotifier explicitly when flushing events Try to decouple the dependency on cache->notifier in code. This is a good start. --- src/libtracker-sparql/direct/tracker-direct.c | 2 +- src/libtracker-sparql/tracker-notifier-private.h | 3 ++- src/libtracker-sparql/tracker-notifier.c | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/libtracker-sparql/direct/tracker-direct.c b/src/libtracker-sparql/direct/tracker-direct.c index c44254bcb..b3172ea32 100644 --- a/src/libtracker-sparql/direct/tracker-direct.c +++ b/src/libtracker-sparql/direct/tracker-direct.c @@ -723,7 +723,7 @@ commit_statement_cb (gpointer user_data) while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &cache)) { g_hash_table_iter_steal (&iter); - _tracker_notifier_event_cache_flush_events (cache); + _tracker_notifier_event_cache_flush_events (notifier, cache); } } diff --git a/src/libtracker-sparql/tracker-notifier-private.h b/src/libtracker-sparql/tracker-notifier-private.h index c9bc73e18..f277cb3f6 100644 --- a/src/libtracker-sparql/tracker-notifier-private.h +++ b/src/libtracker-sparql/tracker-notifier-private.h @@ -37,7 +37,8 @@ _tracker_notifier_event_cache_push_event (TrackerNotifierEventCache *cache, gint64 id, TrackerNotifierEventType event_type); -void _tracker_notifier_event_cache_flush_events (TrackerNotifierEventCache *cache); +void _tracker_notifier_event_cache_flush_events (TrackerNotifier *notifier, + TrackerNotifierEventCache *cache); const gchar * tracker_notifier_event_cache_get_graph (TrackerNotifierEventCache *cache); diff --git a/src/libtracker-sparql/tracker-notifier.c b/src/libtracker-sparql/tracker-notifier.c index 63cf0e61f..0347e0c7d 100644 --- a/src/libtracker-sparql/tracker-notifier.c +++ b/src/libtracker-sparql/tracker-notifier.c @@ -652,9 +652,9 @@ out: } void -_tracker_notifier_event_cache_flush_events (TrackerNotifierEventCache *cache) +_tracker_notifier_event_cache_flush_events (TrackerNotifier *notifier, + TrackerNotifierEventCache *cache) { - TrackerNotifier *notifier = cache->notifier; TrackerNotifierPrivate *priv = tracker_notifier_get_instance_private (notifier); if (g_sequence_is_empty (cache->sequence)) { @@ -697,7 +697,7 @@ graph_updated_cb (GDBusConnection *connection, handle_events (notifier, cache, events); g_variant_iter_free (events); - _tracker_notifier_event_cache_flush_events (cache); + _tracker_notifier_event_cache_flush_events (notifier, cache); } static void -- cgit v1.2.1 From 140b6312ba77d38c92872b3bbcba82f2103b9132 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 10 Apr 2023 20:38:29 +0200 Subject: libtracker-sparql: Pass cancellable through notifier event cache struct Avoid poking the notifier for this, passing the cancellable for async operations with the cache struct itself. --- src/libtracker-sparql/tracker-notifier.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/libtracker-sparql/tracker-notifier.c b/src/libtracker-sparql/tracker-notifier.c index 0347e0c7d..327200069 100644 --- a/src/libtracker-sparql/tracker-notifier.c +++ b/src/libtracker-sparql/tracker-notifier.c @@ -93,6 +93,7 @@ struct _TrackerNotifierEventCache { TrackerNotifierSubscription *subscription; gchar *graph; TrackerNotifier *notifier; + GCancellable *cancellable; GSequence *sequence; GSequenceIter *first; }; @@ -204,11 +205,15 @@ _tracker_notifier_event_cache_new_full (TrackerNotifier *notifier, const gchar *graph) { TrackerNotifierEventCache *event_cache; + TrackerNotifierPrivate *priv; + + priv = tracker_notifier_get_instance_private (notifier); event_cache = g_new0 (TrackerNotifierEventCache, 1); event_cache->notifier = g_object_ref (notifier); event_cache->subscription = subscription; event_cache->graph = g_strdup (graph); + event_cache->cancellable = g_object_ref (priv->cancellable); event_cache->sequence = g_sequence_new ((GDestroyNotify) tracker_notifier_event_unref); return event_cache; @@ -226,6 +231,7 @@ _tracker_notifier_event_cache_free (TrackerNotifierEventCache *event_cache) { g_sequence_free (event_cache->sequence); g_object_unref (event_cache->notifier); + g_object_unref (event_cache->cancellable); g_free (event_cache->graph); g_free (event_cache); } @@ -464,7 +470,7 @@ ensure_extra_info_statement (TrackerNotifier *notifier, sparql = create_extra_info_query (notifier, cache); *ptr = tracker_sparql_connection_query_statement (priv->connection, sparql, - priv->cancellable, + cache->cancellable, &error); g_free (sparql); @@ -567,14 +573,12 @@ query_extra_info_cb (GObject *object, { TrackerNotifierEventCache *cache = user_data; TrackerSparqlStatement *statement; - TrackerNotifierPrivate *priv; TrackerSparqlCursor *cursor; GError *error = NULL; GTask *task; statement = TRACKER_SPARQL_STATEMENT (object); cursor = tracker_sparql_statement_execute_finish (statement, res, &error); - priv = tracker_notifier_get_instance_private (cache->notifier); if (!cursor) { if (!g_error_matches (error, @@ -588,7 +592,7 @@ query_extra_info_cb (GObject *object, return; } - task = g_task_new (cursor, priv->cancellable, finish_query, NULL); + task = g_task_new (cursor, cache->cancellable, finish_query, NULL); g_task_set_task_data (task, cache, NULL); g_task_run_in_thread (task, handle_cursor); g_object_unref (task); @@ -643,7 +647,7 @@ tracker_notifier_query_extra_info (TrackerNotifier *notifier, bind_arguments (statement, cache); tracker_sparql_statement_execute_async (statement, - priv->cancellable, + cache->cancellable, query_extra_info_cb, cache); -- cgit v1.2.1 From e6d8c7c83e7496fd75fc3bffdb7764ba85a139c8 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 10 Apr 2023 20:45:52 +0200 Subject: libtracker-sparql: Pass service through TrackerNotifier event cache struct Figure the service IRI early on cache struct creation, so we do not need to rely on subscription+notifier to create it afterwards. --- src/libtracker-sparql/tracker-notifier.c | 34 ++++++++++++++------------------ 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/src/libtracker-sparql/tracker-notifier.c b/src/libtracker-sparql/tracker-notifier.c index 327200069..72201d07e 100644 --- a/src/libtracker-sparql/tracker-notifier.c +++ b/src/libtracker-sparql/tracker-notifier.c @@ -91,6 +91,7 @@ struct _TrackerNotifierPrivate { struct _TrackerNotifierEventCache { TrackerNotifierSubscription *subscription; + gchar *service; gchar *graph; TrackerNotifier *notifier; GCancellable *cancellable; @@ -128,6 +129,9 @@ G_DEFINE_TYPE_WITH_CODE (TrackerNotifier, tracker_notifier, G_TYPE_OBJECT, static void tracker_notifier_query_extra_info (TrackerNotifier *notifier, TrackerNotifierEventCache *cache); +static gchar * get_service_name (TrackerNotifier *notifier, + TrackerNotifierSubscription *subscription); + static TrackerNotifierSubscription * tracker_notifier_subscription_new (TrackerNotifier *notifier, GDBusConnection *connection, @@ -216,6 +220,9 @@ _tracker_notifier_event_cache_new_full (TrackerNotifier *notifier, event_cache->cancellable = g_object_ref (priv->cancellable); event_cache->sequence = g_sequence_new ((GDestroyNotify) tracker_notifier_event_unref); + if (subscription) + event_cache->service = get_service_name (notifier, subscription); + return event_cache; } @@ -232,6 +239,7 @@ _tracker_notifier_event_cache_free (TrackerNotifierEventCache *event_cache) g_sequence_free (event_cache->sequence); g_object_unref (event_cache->notifier); g_object_unref (event_cache->cancellable); + g_free (event_cache->service); g_free (event_cache->graph); g_free (event_cache); } @@ -334,17 +342,12 @@ compose_uri (const gchar *service, } static gchar * -get_service_name (TrackerNotifier *notifier, - TrackerNotifierEventCache *cache) +get_service_name (TrackerNotifier *notifier, + TrackerNotifierSubscription *subscription) { - TrackerNotifierSubscription *subscription; TrackerNotifierPrivate *priv; priv = tracker_notifier_get_instance_private (notifier); - subscription = cache->subscription; - - if (!subscription) - return NULL; /* This is a hackish way to find out we are dealing with DBus connections, * without pulling its header. @@ -374,15 +377,13 @@ static gboolean tracker_notifier_emit_events (TrackerNotifierEventCache *cache) { GPtrArray *events; - gchar *service; events = tracker_notifier_event_cache_take_events (cache); if (events) { - service = get_service_name (cache->notifier, cache); - g_signal_emit (cache->notifier, signals[EVENTS], 0, service, cache->graph, events); + g_signal_emit (cache->notifier, signals[EVENTS], 0, + cache->service, cache->graph, events); g_ptr_array_unref (events); - g_free (service); } return G_SOURCE_REMOVE; @@ -411,17 +412,14 @@ create_extra_info_query (TrackerNotifier *notifier, TrackerNotifierEventCache *cache) { GString *sparql; - gchar *service; gint i; sparql = g_string_new ("SELECT ?id ?uri "); - service = get_service_name (notifier, cache); - - if (service) { + if (cache->service) { g_string_append_printf (sparql, "{ SERVICE <%s> ", - service); + cache->service); } g_string_append (sparql, "{ VALUES ?id { "); @@ -436,13 +434,11 @@ create_extra_info_query (TrackerNotifier *notifier, " FILTER (?id > 0) ." "} "); - if (service) + if (cache->service) g_string_append (sparql, "} "); g_string_append (sparql, "ORDER BY xsd:integer(?id)"); - g_free (service); - return g_string_free (sparql, FALSE); } -- cgit v1.2.1 From f06295b1e19e50eb498ea1cf9816df798bfab0e9 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 10 Apr 2023 21:06:47 +0200 Subject: libtracker-sparql: Keep statement in cache event struct Instead of figuring out from the subscription later on. --- src/libtracker-sparql/tracker-notifier.c | 47 ++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/src/libtracker-sparql/tracker-notifier.c b/src/libtracker-sparql/tracker-notifier.c index 72201d07e..6f94813aa 100644 --- a/src/libtracker-sparql/tracker-notifier.c +++ b/src/libtracker-sparql/tracker-notifier.c @@ -90,11 +90,11 @@ struct _TrackerNotifierPrivate { }; struct _TrackerNotifierEventCache { - TrackerNotifierSubscription *subscription; gchar *service; gchar *graph; TrackerNotifier *notifier; GCancellable *cancellable; + TrackerSparqlStatement *stmt; GSequence *sequence; GSequenceIter *first; }; @@ -132,6 +132,9 @@ static void tracker_notifier_query_extra_info (TrackerNotifier *notifi static gchar * get_service_name (TrackerNotifier *notifier, TrackerNotifierSubscription *subscription); +static TrackerSparqlStatement * ensure_extra_info_statement (TrackerNotifier *notifier, + TrackerNotifierSubscription *subscription); + static TrackerNotifierSubscription * tracker_notifier_subscription_new (TrackerNotifier *notifier, GDBusConnection *connection, @@ -215,10 +218,10 @@ _tracker_notifier_event_cache_new_full (TrackerNotifier *notifier, event_cache = g_new0 (TrackerNotifierEventCache, 1); event_cache->notifier = g_object_ref (notifier); - event_cache->subscription = subscription; event_cache->graph = g_strdup (graph); event_cache->cancellable = g_object_ref (priv->cancellable); event_cache->sequence = g_sequence_new ((GDestroyNotify) tracker_notifier_event_unref); + event_cache->stmt = ensure_extra_info_statement (notifier, subscription); if (subscription) event_cache->service = get_service_name (notifier, subscription); @@ -349,6 +352,9 @@ get_service_name (TrackerNotifier *notifier, priv = tracker_notifier_get_instance_private (notifier); + if (!subscription) + return NULL; + /* This is a hackish way to find out we are dealing with DBus connections, * without pulling its header. */ @@ -408,18 +414,21 @@ tracker_notifier_emit_events_in_idle (TrackerNotifierEventCache *cache) } static gchar * -create_extra_info_query (TrackerNotifier *notifier, - TrackerNotifierEventCache *cache) +create_extra_info_query (TrackerNotifier *notifier, + TrackerNotifierSubscription *subscription) { GString *sparql; + gchar *service; gint i; sparql = g_string_new ("SELECT ?id ?uri "); - if (cache->service) { + service = get_service_name (notifier, subscription); + + if (service) { g_string_append_printf (sparql, "{ SERVICE <%s> ", - cache->service); + service); } g_string_append (sparql, "{ VALUES ?id { "); @@ -434,17 +443,19 @@ create_extra_info_query (TrackerNotifier *notifier, " FILTER (?id > 0) ." "} "); - if (cache->service) + if (service) g_string_append (sparql, "} "); g_string_append (sparql, "ORDER BY xsd:integer(?id)"); + g_free (service); + return g_string_free (sparql, FALSE); } static TrackerSparqlStatement * -ensure_extra_info_statement (TrackerNotifier *notifier, - TrackerNotifierEventCache *cache) +ensure_extra_info_statement (TrackerNotifier *notifier, + TrackerNotifierSubscription *subscription) { TrackerSparqlStatement **ptr; TrackerNotifierPrivate *priv; @@ -453,8 +464,8 @@ ensure_extra_info_statement (TrackerNotifier *notifier, priv = tracker_notifier_get_instance_private (notifier); - if (cache->subscription) { - ptr = &cache->subscription->statement; + if (subscription) { + ptr = &subscription->statement; } else { ptr = &priv->local_statement; } @@ -463,10 +474,10 @@ ensure_extra_info_statement (TrackerNotifier *notifier, return *ptr; } - sparql = create_extra_info_query (notifier, cache); + sparql = create_extra_info_query (notifier, subscription); *ptr = tracker_sparql_connection_query_statement (priv->connection, sparql, - cache->cancellable, + priv->cancellable, &error); g_free (sparql); @@ -631,23 +642,17 @@ tracker_notifier_query_extra_info (TrackerNotifier *notifier, TrackerNotifierEventCache *cache) { TrackerNotifierPrivate *priv; - TrackerSparqlStatement *statement; priv = tracker_notifier_get_instance_private (notifier); g_mutex_lock (&priv->mutex); - statement = ensure_extra_info_statement (notifier, cache); - if (!statement) - goto out; - - bind_arguments (statement, cache); - tracker_sparql_statement_execute_async (statement, + bind_arguments (cache->stmt, cache); + tracker_sparql_statement_execute_async (cache->stmt, cache->cancellable, query_extra_info_cb, cache); -out: g_mutex_unlock (&priv->mutex); } -- cgit v1.2.1 From 2b20eb62f3e5e721f1933f372774db1e765a9c31 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 10 Apr 2023 21:16:18 +0200 Subject: libtracker-sparql: Take TrackerNotifier weak ref when emitting events Avoid keeping a hard ref while notifier events are being dispatched, this makes the TrackerNotifier lifetime completely in control of the user. --- src/libtracker-sparql/tracker-notifier.c | 35 +++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/src/libtracker-sparql/tracker-notifier.c b/src/libtracker-sparql/tracker-notifier.c index 6f94813aa..0eae20681 100644 --- a/src/libtracker-sparql/tracker-notifier.c +++ b/src/libtracker-sparql/tracker-notifier.c @@ -92,7 +92,7 @@ struct _TrackerNotifierPrivate { struct _TrackerNotifierEventCache { gchar *service; gchar *graph; - TrackerNotifier *notifier; + GWeakRef notifier; GCancellable *cancellable; TrackerSparqlStatement *stmt; GSequence *sequence; @@ -217,7 +217,7 @@ _tracker_notifier_event_cache_new_full (TrackerNotifier *notifier, priv = tracker_notifier_get_instance_private (notifier); event_cache = g_new0 (TrackerNotifierEventCache, 1); - event_cache->notifier = g_object_ref (notifier); + g_weak_ref_init (&event_cache->notifier, notifier); event_cache->graph = g_strdup (graph); event_cache->cancellable = g_object_ref (priv->cancellable); event_cache->sequence = g_sequence_new ((GDestroyNotify) tracker_notifier_event_unref); @@ -240,7 +240,7 @@ void _tracker_notifier_event_cache_free (TrackerNotifierEventCache *event_cache) { g_sequence_free (event_cache->sequence); - g_object_unref (event_cache->notifier); + g_weak_ref_clear (&event_cache->notifier); g_object_unref (event_cache->cancellable); g_free (event_cache->service); g_free (event_cache->graph); @@ -382,23 +382,30 @@ get_service_name (TrackerNotifier *notifier, static gboolean tracker_notifier_emit_events (TrackerNotifierEventCache *cache) { + TrackerNotifier *notifier; GPtrArray *events; + notifier = g_weak_ref_get (&cache->notifier); + if (!notifier) + return G_SOURCE_REMOVE; + events = tracker_notifier_event_cache_take_events (cache); if (events) { - g_signal_emit (cache->notifier, signals[EVENTS], 0, + g_signal_emit (notifier, signals[EVENTS], 0, cache->service, cache->graph, events); g_ptr_array_unref (events); } + g_object_unref (notifier); + return G_SOURCE_REMOVE; } static void -tracker_notifier_emit_events_in_idle (TrackerNotifierEventCache *cache) +tracker_notifier_emit_events_in_idle (TrackerNotifier *notifier, + TrackerNotifierEventCache *cache) { - TrackerNotifier *notifier = cache->notifier; TrackerNotifierPrivate *priv; GSource *source; @@ -498,8 +505,8 @@ handle_cursor (GTask *task, { TrackerNotifierEventCache *cache = task_data; TrackerSparqlCursor *cursor = source_object; - TrackerNotifier *notifier = cache->notifier; - TrackerNotifierPrivate *priv = tracker_notifier_get_instance_private (notifier); + TrackerNotifier *notifier; + TrackerNotifierPrivate *priv; TrackerNotifierEvent *event; GSequenceIter *iter; gint64 id; @@ -532,12 +539,19 @@ handle_cursor (GTask *task, return; } + notifier = g_weak_ref_get (&cache->notifier); + if (!notifier) { + _tracker_notifier_event_cache_free (cache); + return; + } + + priv = tracker_notifier_get_instance_private (notifier); cache->first = iter; if (g_sequence_iter_is_end (cache->first)) { TrackerNotifierEventCache *next; - tracker_notifier_emit_events_in_idle (cache); + tracker_notifier_emit_events_in_idle (notifier, cache); g_async_queue_lock (priv->queue); next = g_async_queue_try_pop_unlocked (priv->queue); @@ -551,6 +565,7 @@ handle_cursor (GTask *task, } g_task_return_boolean (task, TRUE); + g_object_unref (notifier); } static void @@ -671,7 +686,7 @@ _tracker_notifier_event_cache_flush_events (TrackerNotifier *notifier, g_async_queue_lock (priv->queue); if (priv->urn_query_disabled) { - tracker_notifier_emit_events_in_idle (cache); + tracker_notifier_emit_events_in_idle (notifier, cache); } else if (priv->querying) { g_async_queue_push_unlocked (priv->queue, cache); } else { -- cgit v1.2.1