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

Breadcrumb

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

function Pool::cmpCallback

Execute callback(s)

1 call to Pool::cmpCallback()
Pool::batch in vendor/guzzlehttp/guzzle/src/Pool.php
Sends multiple requests concurrently and returns an array of responses and exceptions that uses the same ordering as the provided requests.

File

vendor/guzzlehttp/guzzle/src/Pool.php, line 111

Class

Pool
Sends an iterator of requests concurrently using a capped pool size.

Namespace

GuzzleHttp

Code

private static function cmpCallback(array &$options, string $name, array &$results) : void {
    if (!isset($options[$name])) {
        $options[$name] = static function ($v, $k) use (&$results) {
            $results[$k] = $v;
        };
    }
    else {
        $currentFn = $options[$name];
        $options[$name] = static function ($v, $k) use (&$results, $currentFn) {
            $currentFn($v, $k);
            $results[$k] = $v;
        };
    }
}

API Navigation

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