[glib: 1/2] gtask: Document dependency on GMainContext more explicitly




commit ef72bed1c0ad692b9be4615c44d4a69e91ab9fd0
Author: Philip Withnall <pwithnall endlessos org>
Date:   Fri Sep 24 07:57:49 2021 +0100

    gtask: Document dependency on GMainContext more explicitly
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Fixes: #2404

 gio/gtask.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gio/gtask.c b/gio/gtask.c
index a767e1909..2c788367a 100644
--- a/gio/gtask.c
+++ b/gio/gtask.c
@@ -58,6 +58,10 @@
  * use g_task_propagate_pointer() or the like to extract the
  * return value.
  *
+ * Using #GTask requires the thread-default #GMainContext from when the
+ * #GTask was constructed to be running at least until the task has completed
+ * and its data has been freed.
+ *
  * Here is an example for using GTask as a GAsyncResult:
  * |[<!-- language="C" -->
  *     typedef struct {


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