You are here

function each_limit_all in Lockr 7.3

Like each_limit, but ensures that no promise in the given $iterable argument is rejected. If any promise is rejected, then the aggregate promise is rejected with the encountered rejection.

Parameters

mixed $iterable:

int|callable $concurrency:

callable $onFulfilled:

Return value

PromiseInterface

File

vendor/guzzlehttp/promises/src/functions.php, line 396

Namespace

GuzzleHttp\Promise

Code

function each_limit_all($iterable, $concurrency, callable $onFulfilled = null) {
  return each_limit($iterable, $concurrency, $onFulfilled, function ($reason, $idx, PromiseInterface $aggregate) {
    $aggregate
      ->reject($reason);
  });
}