if (!
isset($config['concurrency'
])) { $config['concurrency'
] = 25;
} if (isset($config['options'
])) { $opts =
$config['options'
];
unset($config['options'
]);
} else { $opts =
[];
} $iterable = P\Create::
iterFor($requests);
$requests =
static function D
) use ($iterable,
$client,
$opts) { foreach ($iterable as $key =>
$rfn) { if ($rfn instanceof RequestInterface
) { yield $key =>
$client->
sendAsync($rfn,
$opts);
} elseif (\
is_callable($rfn)) { yield $key =>
$rfn($opts);
} else { throw new \
InvalidArgumentException('Each value yielded by the iterator must be a Psr7\Http\Message\RequestInterface or a callable that returns a promise that fulfills with a Psr7\Message\Http\ResponseInterface object.'
);
} } };