queue()
queue(\GuzzleHttp\Promise\TaskQueueInterface $assign = null) : \GuzzleHttp\Promise\TaskQueueInterface
Get the global task queue used for promise resolution.
This task queue MUST be run in an event loop in order for promises to be settled asynchronously. It will be automatically run when synchronously waiting on a promise.
while ($eventLoop->isRunning()) {
GuzzleHttp\Promise\Utils::queue()->run();
}
Parameters
\GuzzleHttp\Promise\TaskQueueInterface | $assign | Optionally specify a new queue instance. |