public function join() : \Generator
{
if (null === $this->delayed) {
throw new StatusError('The process has not been started.');
}
$this->poll->listen();
try {
return (yield $this->delayed);
} finally {
$this->stdout->close();
$this->stderr->close();
}
}
/** * {@inheritdoc} */ public function join() { if (null === $this->channel) { throw new StatusError('The process has not been started.'); } $response = (yield $this->channel->receive()); yield $this->process->join(); if (!$response instanceof ExitStatusInterface) { throw new SynchronizationError('Did not receive an exit status from thread.'); } yield $response->getResult(); }