src/Rocketeer/Services/Tasks/TasksQueue.php
protected function runAsynchronously(Pipeline $pipeline)
    {
        $this->parallel = $this->parallel ?: new Parallel();

        // Check if supported
        if (!$this->parallel->isSupported()) {
            throw new Exception('Parallel jobs require the PCNTL extension');
        }

        try {
            $results = $this->parallel->values($pipeline->all());
            $pipeline->setResults($results);
        } catch (LogicException $exception) {
            return $this->runSynchronously($pipeline);
        }

        return $pipeline;
    }
protected function runAsynchronously(Pipeline $pipeline)
    {
        $this->parallel = $this->parallel ?: new Parallel();

        // Check if supported
        if (!$this->parallel->isSupported()) {
            throw new Exception('Parallel jobs require the PCNTL extension');
        }

        try {
            $results = $this->parallel->values($pipeline->all());
            $pipeline->setResults($results);
        } catch (LogicException $exception) {
            return $this->runSynchronously($pipeline);
        }

        return $pipeline;
    }
protected function runAsynchronously ( Pipeline $ pipeline ) { $ this -> parallel = $ this -> parallel ? : new Parallel ( ) ; // Check if supported if ( ! $ this -> parallel -> isSupported ( ) ) { throw new Exception ( 'Parallel jobs require the PCNTL extension' ) ; } try { $ results = $ this -> parallel -> values ( $ pipeline -> all ( ) ) ; $ pipeline -> setResults ( $ results ) ; } catch ( LogicException $ exception ) { return $ this -> runSynchronously ( $ pipeline ) ; } return $ pipeline ; }
Run the pipeline in parallel order.

@param Pipeline $pipeline

@throws \Exception

@return Pipeline
Run the pipeline in parallel order .