[glib: 1/2] gtask: Clarify what counts as ‘too many tasks’ for rate limiting




commit 13ba8d82abe58178e5261df18bdb809a58b1f8a8
Author: Philip Withnall <pwithnall endlessos org>
Date:   Wed Apr 14 11:37:51 2021 +0100

    gtask: Clarify what counts as ‘too many tasks’ for rate limiting
    
    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 <pwithnall endlessos org>
    
    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
  */


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