get_cancellable


Description:

public unowned Cancellable? get_cancellable ()

Gets a [class@Gio.

Cancellable] that will cancel when the promise has been discarded (and therefore result no longer necessary).

This is useful when manually implementing wrappers around various [callback@Gio.AsyncReadyCallback] based API.

If this was created with [ctor@Dex.Promise.new], then null is returned.

Parameters:

this

a [class@Dex.Promise]

Returns:

a [class@Gio.Cancellable] or null