Icicle\Awaitable\Internal\FulfilledAwaitable::done PHP Method

done() public method

public done ( callable $onFulfilled = null, callable $onRejected = null )
$onFulfilled callable
$onRejected callable
    public function done(callable $onFulfilled = null, callable $onRejected = null)
    {
        if (null !== $onFulfilled) {
            try {
                $onFulfilled($this->value);
            } catch (Throwable $exception) {
                Loop\queue(function () use($exception) {
                    throw $exception;
                    // Rethrow exception in uncatchable way.
                });
            }
        }
    }