diff --git a/gio/gtask.c b/gio/gtask.c
index 4af4237..32f5586 100644
--- a/gio/gtask.c
+++ b/gio/gtask.c
@@ -607,14 +607,10 @@ static gint tasks_running;
  * own) until tasks start completing again. These "overflow" threads
  * will only run one task apiece, and then exit, so the pool will
  * eventually get back down to its base size.
- *
- * The base and multiplier below gives us 10 extra threads after about
- * a second of blocking, 30 after 5 seconds, 100 after a minute, and
- * 200 after 20 minutes.
  */
 #define G_TASK_POOL_SIZE 10
 #define G_TASK_WAIT_TIME_BASE 100000
-#define G_TASK_WAIT_TIME_MULTIPLIER 1.03
+#define G_TASK_WAIT_TIME_MULTIPLIER 1.3
 #define G_TASK_WAIT_TIME_MAX (30 * 60 * 1000000)
 
 static void
@@ -1249,9 +1245,18 @@ g_task_thread_complete (GTask *task)
 static gboolean
 task_pool_manager_timeout (gpointer user_data)
 {
+  guint tasks_pending;
+
   g_mutex_lock (&task_pool_mutex);
-  g_thread_pool_set_max_threads (task_pool, tasks_running + 1, NULL);
+  tasks_pending = g_thread_pool_unprocessed (task_pool);
+  if (tasks_pending >= tasks_running * 1.8)
+    g_thread_pool_set_max_threads (task_pool, tasks_running * 2, NULL);
+  else
+    g_thread_pool_set_max_threads (task_pool, tasks_running + 1, NULL);
   g_source_set_ready_time (task_pool_manager, -1);
+  task_wait_time *= G_TASK_WAIT_TIME_MULTIPLIER;
+  if (task_wait_time > G_TASK_WAIT_TIME_MAX)
+    task_wait_time = G_TASK_WAIT_TIME_MAX;
   g_mutex_unlock (&task_pool_mutex);
 
   return TRUE;
@@ -1266,10 +1271,8 @@ g_task_thread_setup (void)
 
   if (tasks_running == G_TASK_POOL_SIZE)
     task_wait_time = G_TASK_WAIT_TIME_BASE;
-  else if (tasks_running > G_TASK_POOL_SIZE && task_wait_time < G_TASK_WAIT_TIME_MAX)
-    task_wait_time *= G_TASK_WAIT_TIME_MULTIPLIER;
 
-  if (tasks_running >= G_TASK_POOL_SIZE)
+  if (tasks_running >= G_TASK_POOL_SIZE && g_source_get_ready_time (task_pool_manager) == -1)
     g_source_set_ready_time (task_pool_manager, g_get_monotonic_time () + task_wait_time);
 
   g_mutex_unlock (&task_pool_mutex);
@@ -1284,9 +1287,18 @@ g_task_thread_cleanup (void)
   tasks_pending = g_thread_pool_unprocessed (task_pool);
 
   if (tasks_running > G_TASK_POOL_SIZE)
-    g_thread_pool_set_max_threads (task_pool, tasks_running - 1, NULL);
+    {
+      if (tasks_pending < tasks_running * 1.8)
+        g_thread_pool_set_max_threads (task_pool, tasks_running - 1, NULL);
+      task_wait_time /= G_TASK_WAIT_TIME_MULTIPLIER;
+      if (task_wait_time < G_TASK_WAIT_TIME_BASE)
+        task_wait_time = G_TASK_WAIT_TIME_BASE;
+    }
   else if (tasks_running + tasks_pending < G_TASK_POOL_SIZE)
-    g_source_set_ready_time (task_pool_manager, -1);
+    {
+      g_source_set_ready_time (task_pool_manager, -1);
+      g_thread_pool_set_max_threads (task_pool, G_TASK_POOL_SIZE, NULL);
+    }
 
   tasks_running--;
   g_mutex_unlock (&task_pool_mutex);
