f3ath / forkrunner
A simple framework to run code in parallel processes
1.2.0
2017-10-03 20:16 UTC
Requires
- php: >=5.4.0
- ext-pcntl: *
Requires (Dev)
- phpunit/phpunit: 4.8.*
README
A simple library to run a process in multiple processes
Installation
Via composer:
$ composer require "f3ath/forkrunner"
Usage
<?php $func = function ($n) { return $n * $n; }; $runner = new \F3\ForkRunner\ForkRunner(); $args = [[3], [4], [5]]; $result = $runner->run($func, $args); // [9, 16, 25]