Asynchronous functions are defined by a set of blocks contained in an NSArray.
When a block is finished, it calls success() or failure().
Functions include:
- series: run a set of blocks in sequential order
- parallel: run a set of blocks in parallel
eachSeries
: runs a block in series with every item in an array
eachParallel
: runs a block in parallel with every item in an array
- mapParallel: runs a block in parallel with every item in an array, collecting all the return values
- mapSeries: runs a block in series with every item in an array, collecting all the return values
- repeatUntilSuccess: repeat a block until it succeeds or maxAttempts is reached
- waterfall: run a set of blocks in series, passing the return value of a block to the next block