Implements interfaces: twisted.internet.interfaces.IConsumer

Bare-bones iteration consumer.

I am a bare-bones iteration consumer that accumulates iterations as list items, processing each item by running it through processItem, which you of course can override in your subclass. It can return a Deferred.

Call my instance to get a Deferred that fires with the underlying list when the producer unregisters.

Set any attributes you want me to have using keywords.

Method __init__ Undocumented
Method __call__ Call to get a (deferred) list of what I consumed.
Method registerProducer IConsumer implementation.
Method unregisterProducer IConsumer implementation.
Method write Records data such that it will be returned in the order written, even if processItem takes a different amount of time for each.
Method processItem Process list items as they come in.
def __init__(self, **kw):
Undocumented
def __call__(self):

Call to get a (deferred) list of what I consumed.

def registerProducer(self, producer, streaming):

IConsumer implementation.

def unregisterProducer(self):

IConsumer implementation.

def write(self, data):

Records data such that it will be returned in the order written, even if processItem takes a different amount of time for each.

def processItem(self, item):

Process list items as they come in.

Override this to do special processing on each item as it arrives, returning the (possibly deferred) value of the item that should actually get appended to the list.

API Documentation for AsynQueue, generated by pydoctor at 2022-11-17 13:13:24.