This is based on SYmfony Process and the work done in symfony/symfony#8753.
Run 4 jobs in parallel
$manager = new Neutron\ProcessManager\ProcessManager();
$manager
->add(new Process('...'))
->add(new Process('...'))
->add(new Process('...'))
->add(new Process('...'))
->run();
Run 4 jobs in queue
$manager = new Neutron\ProcessManager\ProcessManager();
$manager
->setMaxParallelProcesses(1)
->add(new Process('...'))
->add(new Process('...'))
->add(new Process('...'))
->add(new Process('...'))
->run();
This is released under the MIT License.