Icicle\Concurrent\Process\Process::join PHP Méthode

join() public méthode

public join ( ) : Generator
Résultat Generator
    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();
        }
    }

Usage Example

    /**
     * {@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();
    }
All Usage Examples Of Icicle\Concurrent\Process\Process::join