You are here

public function Coroutine::resolve in Lockr 7.3

Resolve the promise with the given value.

Parameters

mixed $value:

Throws

\RuntimeException if the promise is already resolved.

Overrides PromiseInterface::resolve

File

vendor/guzzlehttp/promises/src/Coroutine.php, line 93

Class

Coroutine
Creates a promise that is resolved using a generator that yields values or promises (somewhat similar to C#'s async keyword).

Namespace

GuzzleHttp\Promise

Code

public function resolve($value) {
  $this->result
    ->resolve($value);
}