ποΈConcurrency & Pools
Getting Started
<?php
$forge = new ForgeConnector;
// Pool has various optional parameters if you want to set them here...
$pool = $forge->pool(
requests: [],
concurrency: 5,
responseHandler: function () { ... },
exceptionHandler: function () { ... },
);
// Initiate the transfer of requests
$promise = $pool->send();
// Force all the requests to be fulfilled
$promise->wait();Available Methods
Providing Requests
Array of requests
Using a PHP generator
Using a callable or invokable class
Concurrency
Response Handlers
Handling Successful Requests
Handling Failed Requests
Named/Keyed Requests
Sending
Last updated