Skip to content

async.FastDeferred ext

Eugene Lazutkin edited this page Jun 13, 2016 · 4 revisions

Because async.FastDeferred is modelled after async.Deferred to be as close to it as possible, FastDeferred-ext replicates Deferred-ext with FastDeferred-specific algorithms.

Module FastDeferred-ext returns async.FastDeferred adding algorithms from composition algorithms, and seq() as constructor properties instrumented to use FastDeferred:

  • FastDeferred.all()
  • FastDeferred.par()
  • FastDeferred.any()
  • FastDeferred.one()
  • FastDeferred.race()
  • FastDeferred.seq()

Additionally all() and race() are copied to FastDeferred.Wrapper:

  • FastDeferred.Wrapper.all()
  • FastDeferred.Wrapper.race()

Just like their generic counterparts, all functions can accept arguments in the following form, yet continue to use FastDeferred:

var promise = FastDeferred.all(val1, ... valN);