set_check_cancellable


Description:

[ Version ( deprecated = true , deprecated_since = "2.46" , since = "2.32" ) ]
public void set_check_cancellable (Cancellable? check_cancellable)

Warning: set_check_cancellable is deprecated since 2.46.

Sets a Cancellable to check before dispatching results.

Note:

Use Task instead.

This function has one very specific purpose: the provided cancellable is checked at the time of propagate_error If it is cancelled, these functions will return an "Operation was cancelled" error (g_io_error_cancelled).

Implementors of cancellable asynchronous functions should use this in order to provide a guarantee to their callers that cancelling an async operation will reliably result in an error being returned for that operation (even if a positive result for the operation has already been sent as an idle to the main context to be dispatched).

The checking described above is done regardless of any call to the unrelated set_handle_cancellation function.

Parameters:

this

a SimpleAsyncResult

check_cancellable

a Cancellable to check, or null to unset