function each_limit in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/promises/src/functions.php \GuzzleHttp\Promise\each_limit()
Like each, but only allows a certain number of outstanding promises at any given time.
$concurrency may be an integer or a function that accepts the number of pending promises and returns a numeric concurrency limit value to allow for dynamic a concurrency size.
Parameters
mixed $iterable:
int|callable $concurrency:
callable $onFulfilled:
callable $onRejected:
Return value
mixed
1 call to each_limit()
- each_limit_all in vendor/
guzzlehttp/ promises/ src/ functions.php - 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.
File
- vendor/
guzzlehttp/ promises/ src/ functions.php, line 363
Namespace
GuzzleHttp\PromiseCode
function each_limit($iterable, $concurrency, callable $onFulfilled = null, callable $onRejected = null) {
return (new EachPromise($iterable, [
'fulfilled' => $onFulfilled,
'rejected' => $onRejected,
'concurrency' => $concurrency,
]))
->promise();
}