Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 795 Bytes

README.md

File metadata and controls

24 lines (19 loc) · 795 Bytes

PHP Process Pool

Latest Version Total Downloads CI

PHP Process Pool is a simple process pool using symfony process

use ProcessPool\ProcessPool;
use Symfony\Component\Process\Process;

function processGenerator($count) {
    for ($i = 0; $i < 10; $i++) {
        yield new Process(['sleep', $i]);
    }
}

$processes = processGenerator(10);
$pool = new ProcessPool($processes);
$pool->setConcurrency(2);
$pool->wait();