mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-27 17:52:58 +02:00
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:
@@ -152,6 +152,8 @@ gssize g_task_propagate_int (GTask *task,
|
||||
GError **error);
|
||||
GLIB_AVAILABLE_IN_2_36
|
||||
gboolean g_task_had_error (GTask *task);
|
||||
GLIB_AVAILABLE_IN_2_44
|
||||
gboolean g_task_get_completed (GTask *task);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
Reference in New Issue
Block a user