andersondanilo/process-pool

Installs: 141 856

Dependents: 0

Suggesters: 0

Security: 0

Stars: 18

Watchers: 3

Forks: 4

Open Issues: 0

pkg:composer/andersondanilo/process-pool

v2.0.1 2021-02-14 13:39 UTC

This package is auto-updated.

Last update: 2025-09-15 02:11:51 UTC


README

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();