cancel


Description:

public void cancel ()

Will set this to cancelled, and will emit the cancelled signal.

(However, see the warning about race conditions in the documentation for that signal if you are planning to connect to it.)

This function is thread-safe. In other words, you can safely call it from a thread other than the one running the operation that was passed the this.

If this is null, this function returns immediately for convenience.

The convention within GIO is that cancelling an asynchronous operation causes it to complete asynchronously. That is, if you cancel the operation from the same thread in which it is running, then the operation's TaskReadyCallback will not be invoked until the application returns to the main loop.

Parameters:

this

a Cancellable object.