You are here

private function Promise::invokeWaitList in Auth0 Single Sign On 8.2

1 call to Promise::invokeWaitList()
Promise::waitIfPending in vendor/guzzlehttp/promises/src/Promise.php

File

vendor/guzzlehttp/promises/src/Promise.php, line 260

Class

Promise
Promises/A+ implementation that avoids recursion when possible.

Namespace

GuzzleHttp\Promise

Code

private function invokeWaitList() {
  $waitList = $this->waitList;
  $this->waitList = null;
  foreach ($waitList as $result) {
    while (true) {
      $result
        ->waitIfPending();
      if ($result->result instanceof Promise) {
        $result = $result->result;
      }
      else {
        if ($result->result instanceof PromiseInterface) {
          $result->result
            ->wait(false);
        }
        break;
      }
    }
  }
}