@@ 171-178 (lines=8) @@ | ||
168 | * @param LoopInterface|null $loop |
|
169 | * @return array |
|
170 | */ |
|
171 | protected function awaitAll(array $promises, LoopInterface $loop = null, float $timeout = self::DEFAULT_AWAIT_TIMEOUT) |
|
172 | { |
|
173 | if (!($loop instanceof LoopInterface)) { |
|
174 | $loop = Factory::create(); |
|
175 | } |
|
176 | ||
177 | return awaitAll($promises, $loop, $timeout); |
|
178 | } |
|
179 | ||
180 | /** |
|
181 | * @param array $promises |
|
@@ 185-192 (lines=8) @@ | ||
182 | * @param LoopInterface|null $loop |
|
183 | * @return mixed |
|
184 | */ |
|
185 | protected function awaitAny(array $promises, LoopInterface $loop = null, float $timeout = self::DEFAULT_AWAIT_TIMEOUT) |
|
186 | { |
|
187 | if (!($loop instanceof LoopInterface)) { |
|
188 | $loop = Factory::create(); |
|
189 | } |
|
190 | ||
191 | return awaitAny($promises, $loop, $timeout); |
|
192 | } |
|
193 | } |
|
194 |