Provided by worker objects that can have tasks assigned to them for processing.

All worker objects are considered qualified to run tasks of the default None series. To indicate that subclasses or subclass instances are qualified to run tasks of user-defined series in addition to the default, the hashable object that identifies the additional series must be listed in the cQualified or iQualified class or instance attributes, respectively.

Attribute cQualified A class-attribute list containing all series for which all instances of the subclass are qualified to run tasks.
Attribute iQualified An instance-attribute list containing all series for which the subclass instance is qualified to run tasks.
Method setResignator Registers the supplied callableObject to be called if the worker deems it necessary to resign, e.g., a remote connection has been lost.
Method run No summary
Method stop No summary
Method crash Takes drastic action to shut down the worker, rudely and synchronously.
Method _check_qualifications Qualification attributes must be present as lists.
cQualified =

A class-attribute list containing all series for which all instances of the subclass are qualified to run tasks.

iQualified =

An instance-attribute list containing all series for which the subclass instance is qualified to run tasks.

def _check_qualifications(ob):

Qualification attributes must be present as lists.

def setResignator(callableObject):

Registers the supplied callableObject to be called if the worker deems it necessary to resign, e.g., a remote connection has been lost.

def run(task):

Adds the task represented by the specified task object to the list of tasks pending for this worker, to be run however and whenever the worker sees fit. However, workers are expected to run highest-priority tasks before anything else they have lined up in their mini-queues.

Unless the worker is constructed with a raw=True keyword or the task includes raw=True, an iterator resulting from the task is converted into an instance of iteration.Deferator. The underlying iteration (possibly across a pipe or wire) must be handled transparently to the user. If the task has a consumer keyword set to an implementor of IConsumer, an iteration.IterationProducer coupled to that consumer will be the end result instead.

Make sure that any callbacks you add to the task's internal deferred object task.d return the callback argument. Otherwise, the result of your task will be lost in the callback chain.

ReturnsA Deferred that fires when the worker is ready to be assigned another task.
def stop():

Attempts to gracefully shut down the worker, returning a Deferred that fires when the worker is done with all assigned tasks and will not cause any errors if the reactor is stopped or its object is deleted.

The Deferred returned by your implementation of this method must not fire until after the results of all pending tasks have been obtained. Thus the deferred must be chained to each task.d somehow.

Make sure that any callbacks you add to the task's internal deferred object task.d return the callback argument. Otherwise, the result of your task will be lost in the callback chain.

def crash():

Takes drastic action to shut down the worker, rudely and synchronously.

ReturnsA list of task objects, one for each task left uncompleted. You shouldn't have to call this method if no tasks are left pending; the stop method should be enough in that case.
API Documentation for AsynQueue, generated by pydoctor at 2021-09-18 08:41:07.