[tracker/gdbus-evolution] plugins/evolution: Don't use async-update, where's in a thread already
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/gdbus-evolution] plugins/evolution: Don't use async-update, where's in a thread already
- Date: Thu, 28 Oct 2010 09:00:40 +0000 (UTC)
commit c4d2d345618b9e18d6d8be6b3e40d3e2e1893391
Author: Philip Van Hoof <philip codeminded be>
Date: Thu Oct 28 10:58:29 2010 +0200
plugins/evolution: Don't use async-update, where's in a thread already
This avoids hammering and excausting tracker-store's FDs
src/plugins/evolution/tracker-evolution-plugin.c | 27 +++++-----------------
1 files changed, 6 insertions(+), 21 deletions(-)
---
diff --git a/src/plugins/evolution/tracker-evolution-plugin.c b/src/plugins/evolution/tracker-evolution-plugin.c
index 6637756..961ea29 100644
--- a/src/plugins/evolution/tracker-evolution-plugin.c
+++ b/src/plugins/evolution/tracker-evolution-plugin.c
@@ -334,22 +334,6 @@ thread_pool_exec (gpointer data, gpointer user_data)
pool->freeup (data, pool->cancel);
}
-static void
-reply_void (GObject *source_object,
- GAsyncResult *result,
- gpointer user_data)
-{
- GError *error = NULL;
-
- tracker_sparql_connection_update_finish (TRACKER_SPARQL_CONNECTION (source_object),
- result, &error);
-
- if (error) {
- g_debug ("Tracker plugin: Error updating data: %s\n", error->message);
- g_error_free (error);
- }
-}
-
static ThreadPool*
thread_pool_new (GFunc func, GFunc freeup, GCompareDataFunc sorter)
{
@@ -411,11 +395,12 @@ send_sparql_update (TrackerEvolutionPlugin *self, const gchar *sparql, gint prio
TrackerEvolutionPluginPrivate *priv = TRACKER_EVOLUTION_PLUGIN_GET_PRIVATE (self);
if (priv->connection) {
- tracker_sparql_connection_update_async (priv->connection,
- sparql,
- G_PRIORITY_DEFAULT,
- NULL,
- reply_void, NULL);
+ tracker_sparql_connection_update (priv->connection,
+ sparql,
+ G_PRIORITY_DEFAULT,
+ NULL,
+ NULL);
+
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]