From 13ba8d82abe58178e5261df18bdb809a58b1f8a8 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 14 Apr 2021 11:37:51 +0100 Subject: [PATCH] =?UTF-8?q?gtask:=20Clarify=20what=20counts=20as=20?= =?UTF-8?q?=E2=80=98too=20many=20tasks=E2=80=99=20for=20rate=20limiting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit However, GLib still can’t guarantee to do rate limiting, as the type of rate limiting which is appropriate depends on what tasks are being run, and the GTask thread pool is shared between all tasks (of many different types) in a process space. Signed-off-by: Philip Withnall Fixes: #2368 --- gio/gtask.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gio/gtask.c b/gio/gtask.c index 2b4720de8..b533a18cf 100644 --- a/gio/gtask.c +++ b/gio/gtask.c @@ -1528,9 +1528,9 @@ g_task_start_task_thread (GTask *task, * * Although GLib currently rate-limits the tasks queued via * g_task_run_in_thread(), you should not assume that it will always - * do this. If you have a very large number of tasks to run, but don't - * want them to all run at once, you should only queue a limited - * number of them at a time. + * do this. If you have a very large number of tasks to run (several tens of + * tasks), but don't want them to all run at once, you should only queue a + * limited number of them (around ten) at a time. * * Since: 2.36 */