[glib] gtask: bump the max thread pool size up to 100 to avoid stalls/deadlocks



commit 7b1f8c582a699305bdbeadebb5628f54112c7220
Author: Dan Winship <danw gnome org>
Date:   Tue Oct 30 15:10:40 2012 -0400

    gtask: bump the max thread pool size up to 100 to avoid stalls/deadlocks
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=686810 for now.
    https://bugzilla.gnome.org/show_bug.cgi?id=687223 discusses a nicer
    fix for later.

 gio/gtask.c      |    2 +-
 gio/tests/task.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/gtask.c b/gio/gtask.c
index 48ddf6a..26fe341 100644
--- a/gio/gtask.c
+++ b/gio/gtask.c
@@ -1763,7 +1763,7 @@ static void
 g_task_thread_pool_init (void)
 {
   task_pool = g_thread_pool_new (g_task_thread_pool_thread, NULL,
-                                 10, FALSE, NULL);
+                                 100, FALSE, NULL);
   g_assert (task_pool != NULL);
 
   g_thread_pool_set_sort_function (task_pool, g_task_compare_priority, NULL);
diff --git a/gio/tests/task.c b/gio/tests/task.c
index e728ff8..8065807 100644
--- a/gio/tests/task.c
+++ b/gio/tests/task.c
@@ -824,7 +824,7 @@ fake_task_thread (GTask        *task,
   g_task_return_boolean (task, TRUE);
 }
 
-#define G_TASK_THREAD_POOL_SIZE 10
+#define G_TASK_THREAD_POOL_SIZE 100
 
 static void
 test_run_in_thread_priority (void)



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