checkIfFinished example

/** * @psalm-suppress NullableReturnStatement */
        return $this->aggregate;
    }

    private function createPromise(): void
    {
        $this->mutex = false;
        $this->aggregate = new Promise(function D): void {
            if ($this->checkIfFinished()) {
                return;
            }
            reset($this->pending);
            // Consume a potentially fluctuating list of promises while             // ensuring that indexes are maintained (precluding array_shift).             while ($promise = current($this->pending)) {
                next($this->pending);
                $promise->wait();
                if (Is::settled($this->aggregate)) {
                    return;
                }
            }
Home | Imprint | This part of the site doesn't use cookies.