public function manage(Process ...$processes)
    {
        $unbounded = ($this->poolSize < 0);

        foreach ($processes as $process) {
            if (!$unbounded && (--$this->poolSize < 0)) {
                throw new LogicException("PooledExecutor pool size [{$this->poolSize}] exceeded.");
            }

            $this->processes[$process->getPid()] = $process;
        }

        return $this;
    }
public function manage(Process ...$processes)
    {
        $unbounded = ($this->poolSize < 0);

        foreach ($processes as $process) {
            if (!$unbounded && (--$this->poolSize < 0)) {
                throw new LogicException("PooledExecutor pool size [{$this->poolSize}] exceeded.");
            }

            $this->processes[$process->getPid()] = $process;
        }

        return $this;
    }
public function manage ( Process ... $ processes ) { $ unbounded = ( $ this -> poolSize < 0 ) ; foreach ( $ processes as $ process ) { if ( ! $ unbounded && ( -- $ this -> poolSize < 0 ) ) { throw new LogicException ( "PooledExecutor pool size [{$this->poolSize}] exceeded." ) ; } $ this -> processes [ $ process -> getPid ( ) ] = $ process ; } return $ this ; }
Manage a selected process.

@param Process[] $processes
@return PooledExecutor
Manage a selected process .