public function runAsync($blocking = self::NON_BLOCKING)
    {
        if ($this->running) {
            throw new RuntimeException('Process already running.');
        }

        try {
            $this->exec(false, $blocking);
        } catch (ProcessException $ex) {
            throw $ex;
        } catch (Exception $ex) {
            $this->cleanup();
            throw new ProcessException('Unknown process exception.', $this, $ex);
        }

        return $this;
    }
public function runAsync($blocking = self::NON_BLOCKING)
    {
        if ($this->running) {
            throw new RuntimeException('Process already running.');
        }

        try {
            $this->exec(false, $blocking);
        } catch (ProcessException $ex) {
            throw $ex;
        } catch (Exception $ex) {
            $this->cleanup();
            throw new ProcessException('Unknown process exception.', $this, $ex);
        }

        return $this;
    }
public function runAsync ( $ blocking = self :: NON_BLOCKING ) { if ( $ this -> running ) { throw new RuntimeException ( 'Process already running.' ) ; } try { $ this -> exec ( false , $ blocking ) ; } catch ( ProcessException $ ex ) { throw $ ex ; } catch ( Exception $ ex ) { $ this -> cleanup ( ) ; throw new ProcessException ( 'Unknown process exception.' , $ this , $ ex ) ; } return $ this ; }
Execute the command asynchronously.

@param bool $blocking

@return Process
@throws ProcessException
Execute the command asynchronously .