[tracker/async-queries-wip: 13/23] libtracker-db: Keep unused threads around for some time



commit 704020425622a54a8445c165979798feb96b8c31
Author: Jürg Billeter <j bitron ch>
Date:   Wed Apr 14 10:40:42 2010 +0200

    libtracker-db: Keep unused threads around for some time

 src/libtracker-db/tracker-db-manager.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-manager.c b/src/libtracker-db/tracker-db-manager.c
index 979b63d..496450e 100644
--- a/src/libtracker-db/tracker-db-manager.c
+++ b/src/libtracker-db/tracker-db-manager.c
@@ -1433,6 +1433,12 @@ tracker_db_interface_pool_init (TrackerDBInterfacePool *pool)
 	g_thread_pool_set_sort_function (priv->interface_pool,
 	                                 compare_pool_jobs_func,
 	                                 NULL);
+
+	/* as the following settings are global for unknown reasons,
+	   let's use the same settings as gio, otherwise the used settings
+	   are rather random */
+	g_thread_pool_set_max_idle_time (15 * 1000);
+	g_thread_pool_set_max_unused_threads (2);
 }
 
 TrackerDBInterfacePool *



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