a.p.ProcessQueue(TaskQueue) : class documentation

Part of asynqueue.process View In Hierarchy Source for process.py Main doc for AsynQueue

A TaskQueue that runs tasks on one or more subordinate Python processes.

I am a TaskQueue for dispatching picklable or keyword-supplied callables to be run by workers from a pool of N worker processes, the number N being specified as the sole argument of my constructor.

Static Method cores
Method __init__
Method stats No summary

Inherited from TaskQueue:

Method __len__ Returns my "length" as the number of workers currently at my disposal.
Method isRunning Returns True if my task handler and queue are running, False otherwise.
Method shutdown You must call this and wait for the Deferred it returns when you're done with me. Calls Queue.shutdown, among other things.
Method attachWorker Registers a new provider of IWorker for working on tasks from the queue.
Method detachWorker Detaches and terminates the worker supplied or specified by its ID, returning a Deferred that fires with a list of tasks left unfinished by the worker.
Method qualifyWorker Adds the specified series to the qualifications of the supplied worker.
Method workers Returns the worker object specified by ID, or None if that worker is not employed with me.
Method taskDone Processes the status/result tuple from a worker running a task. You don't need to call this directly.
Method newTask Make a new tasks.Task object from a func-args-kw combo. You won't call this directly.
Method call Queues up a function call.
Method update No summary
Method _getWorkerID Undocumented
@staticmethod
def cores():
Returns The number of CPU cores available. (type: int)
def __init__(self, N, **kw):
Parameters N The number of workers (subordinate Python processes) initially in the queue. (type: int)
kw Keywords for the regular TaskQueue constructor, except callStats. That enables callStats on each worker.
def stats(self):

Only call this if you've constructed me with callStats=True. Returns a Deferred that fires with a concatenated list of lists from calls to ProcessWorker.stats on each of my workers.

API Documentation for AsynQueue, generated by pydoctor at 2016-11-16 14:52:11.