diff --git a/ChangeLog b/ChangeLog index 733be370a7c4cfc742f948354b0d7a3c729f5771..243dad3bae53ce0c0a0855a1f7f755aacb660989 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-12-31 Benedikt Meurer <benny@xfce.org> + + * thunar-vfs/thunar-vfs.c(_thunar_vfs_init): Do not maintain more than + four unused threads, and stop unused threads after ten seconds of + idle time (requires GLib 2.10). + 2006-12-29 Benedikt Meurer <benny@xfce.org> * thunar-vfs/thunar-vfs-io-local-xfer.c, @@ -8,9 +14,6 @@ thunar-vfs/thunar-vfs-transfer-job.c: Add _thunar_vfs_path_child() as internal implementation of thunar_vfs_path_relative(), that does not perform the expensive sanity checking for release builds. - * thunar-vfs/thunar-vfs.c(_thunar_vfs_init): Do not maintain more than - four unused threads, and stop unused threads after ten seconds of - idle time (requires GLib 2.10). * thunar-vfs/thunar-vfs-io-local.{c,h}: List folders parallel again, with up to four threads collecting file infos at the same time. Additionally, in order to avoid the costly inode lookups when diff --git a/thunar-vfs/thunar-vfs.c b/thunar-vfs/thunar-vfs.c index b1750e6152ed6435fa7c3f03efcebfc577746e52..139a260e7ffca39b24b61d01a165acc9abe8c802 100644 --- a/thunar-vfs/thunar-vfs.c +++ b/thunar-vfs/thunar-vfs.c @@ -78,6 +78,14 @@ thunar_vfs_init (void) /* initialize the jobs framework */ _thunar_vfs_job_init (); + + /* do not maintain more than 4 unused threads */ + g_thread_pool_set_max_unused_threads (4); + +#if GLIB_CHECK_VERSION(2,10,0) + /* stop unused threads after 10 seconds of idle time */ + g_thread_pool_set_max_idle_time (10 * 1000); +#endif } }