kissifrot / symfony-parallel-process
Simple wrapper to enable parallel processing using Symfony Process component
v2.4.0
2024-06-20 11:53 UTC
Requires
- symfony/process: ^5.0 || ^6.0 || ^7.0
Requires (Dev)
- phpunit/phpunit: >7.0
README
A simple wrapper to enable parallel processing using Symfony Process component.
Fork of jagandecapri/symfony-parallel-process
Installation
composer require kissifrot/symfony-parallel-process
Example
<?php use Symfony\Component\Process\Process; use Jack\Symfony\ProcessManager; $proc1 = new Process('ls -l'); $proc2 = new Process('ls -l'); $proc_mgr = new ProcessManager(); $processes = array(); array_push($processes, $proc1, $proc2); $max_parallel_processes = 5; $polling_interval = 1000; // microseconds $proc_mgr->runParallel($processes, $max_parallel_processes, $polling_interval);