src/ParallelPool.php
public function reload($block = true)
    {
        $old_processes = $this->processes;
        for ($i = 0; $i < $this->max; $i++) {
            $process = new Process($this->runnable);
            $process->start();
            $this->processes[$process->getPid()] = $process;
        }

        foreach ($old_processes as $process) {
            $process->shutdown();
            $process->wait($block);
            unset($this->processes[$process->getPid()]);
        }
    }
public function reload($block = true)
    {
        $old_processes = $this->processes;
        for ($i = 0; $i < $this->max; $i++) {
            $process = new Process($this->runnable);
            $process->start();
            $this->processes[$process->getPid()] = $process;
        }

        foreach ($old_processes as $process) {
            $process->shutdown();
            $process->wait($block);
            unset($this->processes[$process->getPid()]);
        }
    }
public function reload ( $ block = true ) { $ old_processes = $ this -> processes ; for ( $ i = 0 ; $ i < $ this -> max ; $ i ++ ) { $ process = new Process ( $ this -> runnable ) ; $ process -> start ( ) ; $ this -> processes [ $ process -> getPid ( ) ] = $ process ; } foreach ( $ old_processes as $ process ) { $ process -> shutdown ( ) ; $ process -> wait ( $ block ) ; unset ( $ this -> processes [ $ process -> getPid ( ) ] ) ; } }
start the same number processes and kill the old sub process
just like nginx -s reload
this method will block until all the old process exit;

@param bool $block
start the same number processes and kill the old sub process just like nginx - s reload this method will block until all the old process exit ;