public function checkQueue()
    {
        if ($this->backlog !== null) {
            while (!$this->backlog->isEmpty()) {
                if ($this->maxConcurrency !== -1 && ($this->jobsNum - $this->resultsNum > $this->maxConcurrency)) {
                    return;
                }
                list($name, $cb) = $this->backlog->shift();
                $this->addJob($name, $cb);
            }
        }
        if ($this->more !== null) {
            $this->more();
        }
    }
public function checkQueue()
    {
        if ($this->backlog !== null) {
            while (!$this->backlog->isEmpty()) {
                if ($this->maxConcurrency !== -1 && ($this->jobsNum - $this->resultsNum > $this->maxConcurrency)) {
                    return;
                }
                list($name, $cb) = $this->backlog->shift();
                $this->addJob($name, $cb);
            }
        }
        if ($this->more !== null) {
            $this->more();
        }
    }
public function checkQueue ( ) { if ( $ this -> backlog !== null ) { while ( ! $ this -> backlog -> isEmpty ( ) ) { if ( $ this -> maxConcurrency !== - 1 && ( $ this -> jobsNum - $ this -> resultsNum > $ this -> maxConcurrency ) ) { return ; } list ( $ name , $ cb ) = $ this -> backlog -> shift ( ) ; $ this -> addJob ( $ name , $ cb ) ; } } if ( $ this -> more !== null ) { $ this -> more ( ) ; } }
Called automatically. Checks whether if the queue is full. If not, tries to pull more jobs from backlog and 'more'
@return void
Called automatically . Checks whether if the queue is full . If not tries to pull more jobs from backlog and more