Amp\Internal\ResolutionQueue class ResolutionQueue

Stores a set of functions to be invoked when a promise is resolved.

Summary

Properties

Methods

Properties

Methods

__construct — public function __construct(callable|null $callback = null)
No documentation.
Type Parameter Description Default Value
callable|null $callback Initial callback to add to queue. null
push — public function push(callable $callback)

Unrolls instances of self to avoid blowing up the call stack on resolution.

Type Parameter Description Default Value
callable $callback No documentation. none
__invoke — public function __invoke(Throwable|null $exception, mixed $value)

Calls each callback in the queue, passing the provided values to the function.

Type Parameter Description Default Value
Throwable|null $exception No documentation. none
mixed $value No documentation. none