deferredlist.js
No description.

File Location

arty/closure/goog/mochikit/async/deferredlist.js

Classes

goog.async.DeferredList
Constructs an object that waits on the results of multiple asynchronous operations and marshals the results. It is itself a Deferred, and may have an execution sequence of callback functions added to it. Each DeferredList instance is single use and may be fired only once. The default behavior of a DeferredList is to wait for a success or error result from every Deferred in its input list. Once every result is available, the DeferredList's execution sequence is fired with a list of [success, result] array pairs, where success is a boolean indicating whether result was the product of a callback or errback. The list's completion criteria and result list may be modified by setting one or more of the boolean options documented below. Deferred instances passed into a DeferredList are independent, and may have additional callbacks and errbacks added to their execution sequences after they are passed as inputs to the list.

Public Protected Private

Global Functions

goog.async.DeferredList.gatherResults(list) !goog.async.Deferred
Creates a DeferredList that gathers results from multiple Deferred inputs. If all inputs succeed, the callback is fired with the list of results as a flat array. If any input fails, the list's errback is fired immediately with the offending error, and all other pending inputs are canceled.
Arguments:
list : !Array.<!goog.async.Deferred>
The list of Deferred inputs to wait for.
Returns: !goog.async.Deferred  The deferred list of results from the inputs if they all succeed, or the error result of the first input to fail.
code »

Directory async

File Reference