private function Promise::invokeWaitFn in Lockr 7.3
1 call to Promise::invokeWaitFn()
- Promise::waitIfPending in vendor/guzzlehttp/promises/src/Promise.php
File
- vendor/guzzlehttp/promises/src/Promise.php, line 241
Class
- Promise
- Promises/A+ implementation that avoids recursion when possible.
Namespace
GuzzleHttp\Promise
Code
private function invokeWaitFn() {
try {
$wfn = $this->waitFn;
$this->waitFn = null;
$wfn(true);
} catch (\Exception $reason) {
if ($this->state === self::PENDING) {
$this
->reject($reason);
}
else {
throw $reason;
}
}
}