https://github.com/andersondanilo/process-pool
PHP Process Pool (Using symfony process)
https://github.com/andersondanilo/process-pool
Last synced: 3 months ago
JSON representation
PHP Process Pool (Using symfony process)
- Host: GitHub
- URL: https://github.com/andersondanilo/process-pool
- Owner: andersondanilo
- License: mit
- Created: 2018-05-26T19:45:36.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-27T11:20:41.000Z (over 1 year ago)
- Last Synced: 2024-08-08T17:17:20.331Z (11 months ago)
- Language: PHP
- Size: 16.6 KB
- Stars: 18
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
PHP Process Pool
================[](https://github.com/andersondanilo/process-pool/releases)
[](//packagist.org/packages/andersondanilo/process-pool)
PHP Process Pool is a simple process pool using symfony process
```php
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();
```