Module: cogen.core.queue
Port of Queue.Queue from the python standard library.
Classes
Empty
Full
QDone
A operation for the queue done_task call
QGet
A operation for the queue get call.
QJoin
A operation for the queue join call.
QPut
A operation for the queue put call.
Queue
This class attempts to mimic the exact functionality of the
python standard library Queue.Queue class, but with a coroutine context:
the queue calls return coroutine operations
So, to use this you write someting like:
the queue calls return coroutine operations
So, to use this you write someting like:
@coroutine def foo(): q = cogen.core.queue.Queue(<size>) yield q.put(123) val = yield q.get()