gtask: Add a GTask:completed property

This can be used to query whether the task has completed, in the sense
that it has had a result set on it, and has already – or will soon –
invoke its callback function.

Notifications for this property are emitted immediately after the task’s
main callback, in the same main context as that callback. This allows
for multiple bits of code to listen for completion of the GTask, which
opens the door for blocking on cancellation of the GTask and improved
handling of ‘pending’ behaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=743636
This commit is contained in:
Philip Withnall
2014-08-21 19:04:04 +01:00
parent e83f9e5254
commit 4f1f68e6be
4 changed files with 245 additions and 21 deletions

View File

@@ -4233,6 +4233,7 @@ g_task_propagate_boolean
g_task_propagate_int
g_task_propagate_pointer
g_task_had_error
g_task_get_completed
<SUBSECTION>
g_task_run_in_thread
g_task_run_in_thread_sync