gemorroj / process-pool
dev-master
2024-07-27 11:56 UTC
Requires
- php: >=8.2
- symfony/event-dispatcher: ^7.0
- symfony/process: ^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.46
- phpstan/phpstan: ^1.10
- phpstan/phpstan-symfony: ^1.3
- phpunit/phpunit: ^10.5
This package is auto-updated.
Last update: 2024-10-27 12:33:45 UTC
README
PHP Process Pool is a simple process pool using Symfony Process
System requirements:
- PHP >= 8.2
- proc_open
Installation:
composer require gemorroj/process-pool
Example:
use ProcessPool\ProcessPool; use Symfony\Component\Process\Process; function processGenerator(int $count): \Generator { for ($i = 0; $i < 10; $i++) { yield new Process(['sleep', $i]); } } $processes = processGenerator(10); $pool = new ProcessPool($processes); $pool->wait();