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



commit 2c7d3b6518e227b5bcb521ee374c463697e903fd
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 9c5cb01..336bc93 100644
--- a/src/libtracker-db/tracker-db-manager.c
+++ b/src/libtracker-db/tracker-db-manager.c
@@ -1441,6 +1441,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]