Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andersondanilo/process-pool
PHP Process Pool (Using symfony process)
https://github.com/andersondanilo/process-pool
Last synced: 4 days 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 (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-27T11:20:41.000Z (8 months ago)
- Last Synced: 2024-08-08T17:17:20.331Z (3 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
================[![Latest Version](https://img.shields.io/github/release/andersondanilo/process-pool.svg?style=flat-square)](https://github.com/andersondanilo/process-pool/releases)
[![Total Downloads](https://poser.pugx.org/andersondanilo/process-pool/downloads)](//packagist.org/packages/andersondanilo/process-pool)
![CI](https://github.com/andersondanilo/process-pool/workflows/CI/badge.svg)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();
```