asynqueue.process.ProcessUniverse(object)
class documentation
Part of asynqueue.process
(View In Hierarchy)
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 | do_next | My loop
calls this when the interprocess pipe sends it a string identifier for one
of the iterators I have pending. |
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.
Call with the sub-process end of an interprocess connection.
My loop
calls this when the interprocess pipe sends it a string identifier for one
of the iterators I have pending.
Returns | A 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) |