芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/qrafiqxcreativeagency.com/accounts/office/vendor/azjezz/psl/src/Psl/Async/any.php
> $awaitables * * @throws Exception\CompositeException If all $awaitables errored. * @throws Exception\InvalidArgumentException If $awaitables is empty. * * @return T */ function any(iterable $awaitables): mixed { $errors = []; foreach (Awaitable::iterate($awaitables) as $first) { try { $result = $first->await(); foreach ($awaitables as $awaitable) { if ($awaitable !== $first) { $awaitable->ignore(); } } return $result; } catch (Throwable $exception) { $errors[] = $exception; } } if ([] === $errors) { throw new Exception\InvalidArgumentException('$awaitables must be a non-empty-iterable.'); } throw new CompositeException($errors); }