src/ParallelPool.php
public function keep($block = false, $interval = 100)
    {
        do {
            $this->start();

            // recycle sub process and delete the processes
            // which are not running from process list
            foreach ($this->processes as $process) {
                if (!$process->isRunning()) {
                    unset($this->processes[$process->getPid()]);
                }
            }

            $block ? usleep($interval) : null;
        } while ($block);
    }
public function keep($block = false, $interval = 100)
    {
        do {
            $this->start();

            // recycle sub process and delete the processes
            // which are not running from process list
            foreach ($this->processes as $process) {
                if (!$process->isRunning()) {
                    unset($this->processes[$process->getPid()]);
                }
            }

            $block ? usleep($interval) : null;
        } while ($block);
    }
public function keep ( $ block = false , $ interval = 100 ) { do { $ this -> start ( ) ; // recycle sub process and delete the processes // which are not running from process list foreach ( $ this -> processes as $ process ) { if ( ! $ process -> isRunning ( ) ) { unset ( $ this -> processes [ $ process -> getPid ( ) ] ) ; } } $ block ? usleep ( $ interval ) : null ; } while ( $ block ) ; }
keep sub process count

@param bool $block block the master process
to keep the sub process count all the time
@param int $interval check time interval
keep sub process count