a.p.ProcessUniverse(object) : class documentation

Part of asynqueue.process View In Hierarchy Source for process.py Project Page for AsynQueue

Each process for a ProcessWorker lives in one of these.

For now, only raw mode is supported with the use of a reactor in the process.

Method __init__ Undocumented
Method loop Runs a loop in a dedicated process that waits for new tasks. The loop exits when a None object is supplied as a task.
Method next My loop calls this when the interprocess pipe sends it a string identifier for one of the iterators I have pending.
def __init__(self, raw=False, callStats=False, useReactor=False):
Undocumented
def loop(self, connection):

Runs a loop in a dedicated process that waits for new tasks. The loop exits when a None object is supplied as a task.

Note that the sub-process can only return a Deferred if I was constructed with useReactor set True and the sub-process has its own reactor running. Otherwise, there should only be a single Twisted reactor running, the one in the main process.

ParametersconnectionThe sub-process end of an interprocess connection.
def next(self, ID):

My loop calls this when the interprocess pipe sends it a string identifier for one of the iterators I have pending.

ReturnsA 2-tuple with the specified iterator's next value, and a bool indicating if the value was valid or a bogus None resulting from a StopIteration error or a non-existent iterator. (type: tuple)
API Documentation for AsynQueue, generated by pydoctor at 2018-08-29 10:51:11.