andersondanilo / process-pool
Installs: 136 185
Dependents: 0
Suggesters: 0
Security: 0
Stars: 18
Watchers: 4
Forks: 4
Open Issues: 0
Requires
- php: >=7.4
- symfony/event-dispatcher: ^4.0 || ^5.0
- symfony/process: ^4.0 || ^5.0
Requires (Dev)
- phpstan/phpstan: ^0.12.0
- phpstan/phpstan-symfony: ^0.12.0
- phpunit/phpunit: ^9.3
- rregeer/phpunit-coverage-check: ^0.3.1
- squizlabs/php_codesniffer: ^3.5
This package is auto-updated.
Last update: 2024-10-15 00:13:20 UTC
README
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();