/** * Initializes a process if possible * * @return void */ protected function init() { if ($this->maxCount === 0 || count($this->procs) < $this->maxCount) { /** @var Process $process */ $process = $this->queue->dequeue(); $proc = new Proc($process->command(), $process->directory(), $process->environment(), $process->input(), $process->timeout()); if ($process->isOutputDisabled()) { $proc->disableOutput(); } $this->startProcess($proc, $process->stdout(), $process->stderr()); $pid = $proc->getPid(); $this->pids[$pid] = true; $this->procs[$pid] = $proc; } }
/** * @expectedException \Novuso\System\Exception\UnderflowException */ public function test_that_front_throws_exception_when_empty() { LinkedQueue::of('int')->front(); }