SimpleAsyncResult.setCheckCancellable

Sets a #GCancellable to check before dispatching results.

This function has one very specific purpose: the provided cancellable is checked at the time of gio.simple_async_result.SimpleAsyncResult.propagateError If it is cancelled, these functions will return an "Operation was cancelled" error (gio.types.IOErrorEnum.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 gio.simple_async_result.SimpleAsyncResult.setHandleCancellation function.

More...
class SimpleAsyncResult
void
setCheckCancellable

Parameters

checkCancellable gio.cancellable.Cancellable

a #GCancellable to check, or null to unset

Detailed Description

Deprecated: Use #GTask instead.