I generate Task instances with the right priority setting for effective scheduling between tasks in one or more concurrently running task series.

Method __init__ Undocumented
Method new Call this to obtain a Task instance that will run in the specified series at a priority reflecting the specified niceness.
Method _serial No summary
def __init__(self, klass=None):
Undocumented
def new(self, func, args, kw, niceness, series=None, timeout=None):

Call this to obtain a Task instance that will run in the specified series at a priority reflecting the specified niceness.

The equation for priority has been empirically determined as follows:

   p = k * (1 + nn**2)

where k is an iterator that increments for each new task and nn is niceness normalized from -20...+20 to the range 0...2.

ParametersfuncA callable object to run as the task, the result of which will be sent to the callback for the deferred of the task returned by this method when it fires.
argsA tuple containing any arguments to include in the call.
kwA dict containing any keywords to include in the call.
def _serial(self, series):

Maintains serial numbers for tasks in one or more separate series, such that the numbers in each series increment independently except that any new series starts at a value greater than the maximum serial number currently found in any series.

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