Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PromiseInterface.php

function PromiseInterface::wait

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.

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 90

Class

PromiseInterface
A promise represents the eventual result of an asynchronous operation.

Namespace

GuzzleHttp\Promise

Code

public function wait(bool $unwrap = true);

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal