t.i.d.DeferredList(Deferred) : class documentation

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

I combine a group of deferreds into one callback.

I track a list of Deferreds for their callbacks, and make a single callback when they have all completed, a list of (success, result) tuples, 'success' being a boolean.

Note that you can still use a Deferred after putting it in a DeferredList. For example, you can suppress 'Unhandled error in Deferred' messages by adding errbacks to the Deferreds *after* putting them in the DeferredList, as a DeferredList won't swallow the errors. (Although a more convenient way to do this is simply to set the consumeErrors flag)
Method __init__ Initialize a DeferredList.
Method _cbDeferred (internal) Callback for when one of my deferreds fires.

Inherited from Deferred:

Method addCallbacks Add a pair of callbacks (success and error) to this Deferred.
Method addCallback Convenience method for adding just a callback.
Method addErrback Convenience method for adding just an errback.
Method addBoth Convenience method for adding a single callable as both a callback and an errback.
Method chainDeferred Chain another Deferred to this Deferred.
Method callback Run all success callbacks that have been added to this Deferred.
Method errback Run all error callbacks that have been added to this Deferred.
Method pause Stop processing on a Deferred until unpause() is called.
Method unpause Process all callbacks made since pause() was called.
Method cancel Cancel this Deferred.
Method setTimeout Set a timeout function to be triggered if I am not called.
Method __str__ Undocumented
Method _continue Undocumented
Method _startRunCallbacks Undocumented
Method _runCallbacks Undocumented
def __init__(self, deferredList, fireOnOneCallback=0, fireOnOneErrback=0, consumeErrors=0): (source)
Initialize a DeferredList.
ParametersdeferredListThe list of deferreds to track. (type: list of Deferreds )
fireOnOneCallback(keyword param) a flag indicating that only one callback needs to be fired for me to call my callback
fireOnOneErrback(keyword param) a flag indicating that only one errback needs to be fired for me to call my errback
consumeErrors(keyword param) a flag indicating that any errors raised in the original deferreds should be consumed by this DeferredList. This is useful to prevent spurious warnings being logged.
def _cbDeferred(self, result, index, succeeded): (source)
(internal) Callback for when one of my deferreds fires.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:17:34.