Skip to main content

AbortableAsyncResult

Represents an abortable result. Specifically, this gives the AsyncResult a :meth:abort() method, that sets the state of the underlying Task to 'ABORTED'.

Constructor

Signature

def AbortableAsyncResult()

Methods


is_aborted()

@classmethod
def is_aborted() - > boolean

Return :const:True if the task is (being) aborted.

Returns

TypeDescription
booleanTrue if the current task state is set to ABORTED, otherwise False

abort()

@classmethod
def abort() - > object

Set the state of the task to :const:ABORTED. Abortable tasks monitor their state at regular intervals and terminate execution if so.

Returns

TypeDescription
objectThe result of the backend store operation after updating the task state