Part of twisted.internet.defer View Source View In Hierarchy
I combine a group of deferreds into one callback.
I track a list of
their callbacks, and make a single callback when they have all completed, a
list of (success, result) tuples, 'success' being a boolean.
Deferredafter 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
|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||callback||Run all success callbacks that have been added to this
|Method||errback||Run all error callbacks that have been added to this
|Method||pause||Stop processing on a
|Method||unpause||Process all callbacks made since
|Method||setTimeout||Set a timeout function to be triggered if I am not called.|
|Parameters||deferredList||The list of deferreds to track.
|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.|