malkusch\lock\mutex\MutexConcurrencyTest::fork PHP Метод

fork() приватный Метод

Forks, runs code in the children and wait until all finished.
private fork ( integer $concurrency, callable $code )
$concurrency integer The amount of forks.
$code callable The code for the fork.
    private function fork($concurrency, callable $code)
    {
        $manager = new ProcessManager();
        for ($i = 0; $i < $concurrency; $i++) {
            $manager->fork($code);
        }
    }