I represent a task that has been dispatched to a queue for running with a given scheduling niceness.

I generate a Deferred that you fire by calling either my callback or errback with a result or failure, respectively, when the the task is finally run and its result is obtained. You can call the deferred's versions of those methods directly, but my versions deal with things like repeated callbacks, which happen sometimes with task timeouts.

Instance Variable d A Deferred to the eventual result of the task.
Instance Variable series A hashable object identifying the series of which this task is a part.
Method __init__ Undocumented
Method startTimer Undocumented
Method addCallback Undocumented
Method callback Undocumented
Method errback Undocumented
Method timedout Undocumented
Method reset Undocumented
Method rush Undocumented
Method relax Undocumented
Method copy Returns a functional copy of me with all necessary attributes and callbacks pre-added.
Method __repr__ Gives me an informative string representation.
Method __lt__ Numeric comparisons between tasks are based on their priority, with higher (lower-numbered) priorities being considered 'less' and thus sorted first.
Method __gt__ Numeric comparisons between tasks are based on their priority, with higher (lower-numbered) priorities being considered 'less' and thus sorted first.
Method __eq__ A task can never have the same priority as a None object, which has the worst priority of anything.
Method __hash__ This was necessary to make Python 3 happy for some reason.
Method _cancelTimeout Undocumented
d =
A Deferred to the eventual result of the task.
series =
A hashable object identifying the series of which this task is a part.
def __init__(self, f, args, kw, priority, series, timeout=None):
Undocumented
def startTimer(self):
Undocumented
def _cancelTimeout(self):
Undocumented
def addCallback(self, f, *args, **kw):
Undocumented
def callback(self, result):
Undocumented
def errback(self, result):
Undocumented
def timedout(self):
Undocumented
def reset(self):
Undocumented
def rush(self):
Undocumented
def relax(self):
Undocumented
def copy(self):

Returns a functional copy of me with all necessary attributes and callbacks pre-added.

def __repr__(self):

Gives me an informative string representation.

def __lt__(self, other):

Numeric comparisons between tasks are based on their priority, with higher (lower-numbered) priorities being considered 'less' and thus sorted first.

A task will always have a higher priority, i.e., be comparatively less, than a None object, which is used as a shutdown signal instead of a task.

def __gt__(self, other):

Numeric comparisons between tasks are based on their priority, with higher (lower-numbered) priorities being considered 'less' and thus sorted first.

A task can never greater (i.e., worse) priority than a None object, which has the worst priority of anything.

def __eq__(self, other):

A task can never have the same priority as a None object, which has the worst priority of anything.

def __hash__(self):

This was necessary to make Python 3 happy for some reason.

API Documentation for AsynQueue, generated by pydoctor at 2022-11-17 13:13:24.