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

Breadcrumb

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

function EachPromise::step

1 call to EachPromise::step()
EachPromise::addPending in vendor/guzzlehttp/promises/src/EachPromise.php

File

vendor/guzzlehttp/promises/src/EachPromise.php, line 219

Class

EachPromise
Represents a promise that iterates over many promises and invokes side-effect functions in the process.

Namespace

GuzzleHttp\Promise

Code

private function step(int $idx) : void {
    // If the promise was already resolved, then ignore this step.
    if (Is::settled($this->aggregate)) {
        return;
    }
    unset($this->pending[$idx]);
    // Only refill pending promises if we are not locked, preventing the
    // EachPromise to recursively invoke the provided iterator, which
    // cause a fatal error: "Cannot resume an already running generator"
    if ($this->advanceIterator() && !$this->checkIfFinished()) {
        // Add more pending promises if possible.
        $this->refillPending();
    }
}

API Navigation

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