Dex.Cancellable

g Dex.Cancellable Dex.Cancellable Dex.Future Dex.Future Dex.Future->Dex.Cancellable Dex.Object Dex.Object Dex.Object->Dex.Future

Subclasses:

None

Methods

Inherited:

Dex.Future (51), Dex.Object (2)

class

new ()

class

new_from_cancellable (cancellable)

cancel ()

Virtual Methods

None

Fields

None

Class Details

class Dex.Cancellable
Bases:

Dex.Future

Abstract:

No

DexCancellable is a simple cancellation primitive which allows for you to create [class`Dex`.Future] that will reject upon cancellation.

Use this combined with other futures using [ctor`Dex`.Future.all_race] to create a future that resolves when all other futures complete or [method`Dex`.Cancellable.cancel] is called to reject.

classmethod new()
Return type:

Dex.Cancellable

Create a new cancellable

classmethod new_from_cancellable(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – a [class`Gio`.Cancellable]

Return type:

Dex.Future

Creates a new [class`Dex`.Cancellable] that will reject when cancellable is cancelled or [method`Dex`.Cancellable.cancel] is called.

cancel()

Rejects self.

Any future that is dependent on this cancellable will be notified of the rejection. For some futures, that may cause them to also reject or resolve.