public isTerminated ( ) : boolean | ||
Результат | boolean | true if process is terminated, false otherwise |
public function isTerminated()
{
$this->updateStatus(false);
return $this->status == self::STATUS_TERMINATED;
}
/** * {@inheritdoc} */ public function wait(Process $process) { $start = microtime(true); $end = $start + $this->timeout / 1000; while (!$process->isTerminated() && microtime(true) < $end) { usleep(self::TICK * 1000); } if ($process->isRunning()) { $callback = $this->callback; $callback(); } $process->wait(); }