src/ParallelPool.php
public function start()
    {
        $alive_count = $this->aliveCount();
        // create sub process and run
        if ($alive_count < $this->max) {
            $need = $this->max - $alive_count;
            for ($i = 0; $i < $need; $i++) {
                $process = new Process($this->runnable);
                $process->start();
                $this->processes[$process->getPid()] = $process;
            }
        }
    }
public function start()
    {
        $alive_count = $this->aliveCount();
        // create sub process and run
        if ($alive_count < $this->max) {
            $need = $this->max - $alive_count;
            for ($i = 0; $i < $need; $i++) {
                $process = new Process($this->runnable);
                $process->start();
                $this->processes[$process->getPid()] = $process;
            }
        }
    }
public function start ( ) { $ alive_count = $ this -> aliveCount ( ) ; // create sub process and run if ( $ alive_count < $ this -> max ) { $ need = $ this -> max - $ alive_count ; for ( $ i = 0 ; $ i < $ need ; $ i ++ ) { $ process = new Process ( $ this -> runnable ) ; $ process -> start ( ) ; $ this -> processes [ $ process -> getPid ( ) ] = $ process ; } } }
start the pool
start the pool