t.i.d.DeferredQueue(object) : class documentation

Part of twisted.internet.defer View Source View In Hierarchy

An event driven queue.

Objects may be added as usual to this queue. When an attempt is made to retrieve an object when the queue is empty, a Deferred is returned which will fire when an object becomes available.
Instance VariablessizeThe maximum number of objects to allow into the queue at a time. When an attempt to add a new object would exceed this limit, QueueOverflow is raised synchronously. None for no limit.
backlogThe maximum number of Deferred gets to allow at one time. When an attempt is made to get an object which would exceed this limit, QueueUnderflow is raised synchronously. None for no limit.
Method __init__ Undocumented
Method put Add an object to this queue.
Method get Attempt to retrieve and remove an object from the queue.
def __init__(self, size=None, backlog=None): (source)
Undocumented
def put(self, obj): (source)
Add an object to this queue.
RaisesQueueOverflowToo many objects are in this queue.
def get(self): (source)
Attempt to retrieve and remove an object from the queue.
Returnsa Deferred which fires with the next object available in the queue.
RaisesQueueUnderflowToo many (more than backlog) Deferreds are already waiting for an object from this queue.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:07:41.