gtask: Document dependency on GMainContext more explicitly

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #2404
This commit is contained in:
Philip Withnall 2021-09-24 07:57:49 +01:00
parent 3b4a34c29a
commit ef72bed1c0

View File

@ -58,6 +58,10 @@
* use g_task_propagate_pointer() or the like to extract the * use g_task_propagate_pointer() or the like to extract the
* return value. * 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: * Here is an example for using GTask as a GAsyncResult:
* |[<!-- language="C" --> * |[<!-- language="C" -->
* typedef struct { * typedef struct {