public function PromiseInterface::wait in Lockr 7.3
Waits until the promise completes if possible.
Pass $unwrap as true to unwrap the result of the promise, either returning the resolved value or throwing the rejected exception.
If the promise cannot be waited on, then the promise will be rejected.
Parameters
bool $unwrap:
Return value
mixed
Throws
\LogicException if the promise has no wait function or if the promise does not settle after waiting.
4 methods override PromiseInterface::wait()
- Coroutine::wait in vendor/
guzzlehttp/ promises/ src/ Coroutine.php - Waits until the promise completes if possible.
- FulfilledPromise::wait in vendor/
guzzlehttp/ promises/ src/ FulfilledPromise.php - Waits until the promise completes if possible.
- Promise::wait in vendor/
guzzlehttp/ promises/ src/ Promise.php - Waits until the promise completes if possible.
- RejectedPromise::wait in vendor/
guzzlehttp/ promises/ src/ RejectedPromise.php - Waits until the promise completes if possible.
File
- vendor/
guzzlehttp/ promises/ src/ PromiseInterface.php, line 92
Class
- PromiseInterface
- A promise represents the eventual result of an asynchronous operation.
Namespace
GuzzleHttp\PromiseCode
public function wait($unwrap = true);