arrayOfTasks
may be a promise for the actual array, and the other
arguments may also be promises. However instead of invoking the tasks with
the promises, they'll be invoked with the fulfillment values.
If the arrayOfTasks
promise or any other argument promise is rejected, the
returned promise will be rejected with the same reason. If a task throws or
returns a rejected promise, the promise returned by sequence()
will be
rejected with that error / reason, and no further tasks will be invoked.
Thenables returned by tasks are not assimilated, but instead are treated as objects.
Returns a Promise
instance that'll be fulfilled with the return value of
the last task. If arrayOfTasks
is empty, the returned promise will be
fulfilled with undefined
.
arrayOfTasks
may be a promise for the actual array, and the other
arguments may also be promises. However instead of invoking the first task
with the promises, it'll be invoked with the fulfillment values.
If the arrayOfTasks
promise or any other argument promise is rejected, the
returned promise will be rejected with the same reason. If a task throws or
returns a rejected promise, the promise returned by pipeline()
will be
rejected with that error / reason, and no further tasks will be invoked.
Thenables returned by tasks are not assimilated, but instead are treated as objects.
arrayOfTasks
may be a promise for the actual array, and the other
arguments may also be promises. However instead of invoking the tasks with
the promises, they'll be invoked with the fulfillment values.
If the arrayOfTasks
promise or any other argument promise is rejected, the
returned promise will be rejected with the same reason. If a task throws or
returns a rejected promise, the promise returned by parallel()
will be
rejected with that error / reason. Since all tasks run in parallel, only when
a task throws synchronously are no other tasks invoked, otherwise their
return values or possible errors are discarded.
Thenables returned by tasks are not assimilated, but instead are treated as objects.
concurrent
Provides helper methods for orchestrating task execution.