You are here

function each_limit_all in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/promises/src/functions.php \GuzzleHttp\Promise\each_limit_all()

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

mixed

File

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

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);
  });
}