mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 15:33:39 +02:00
GSimpleAsyncResult: support reliable cancellation
Add a function g_simple_async_result_set_check_cancellable() to provide a GCancellable that is checked for being cancelled during the call to g_simple_async_result_propagate_error(). This gives asynchronous operation implementations an easy way to provide reliable cancellation of those operations -- even in the case that a positive result has occured and is pending dispatch at the time the operation is cancelled. https://bugzilla.gnome.org/show_bug.cgi?id=672013
This commit is contained in:
@@ -83,6 +83,8 @@ gboolean g_simple_async_result_get_op_res_gboolean (GSimpleAsyncResul
|
||||
|
||||
|
||||
|
||||
void g_simple_async_result_set_check_cancellable (GSimpleAsyncResult *simple,
|
||||
GCancellable *check_cancellable);
|
||||
gpointer g_simple_async_result_get_source_tag (GSimpleAsyncResult *simple);
|
||||
void g_simple_async_result_set_handle_cancellation (GSimpleAsyncResult *simple,
|
||||
gboolean handle_cancellation);
|
||||
|
Reference in New Issue
Block a user