PHPDaemon\Core\ComplexJob::checkQueue PHP Метод

checkQueue() публичный Метод

Called automatically. Checks whether if the queue is full. If not, tries to pull more jobs from backlog and 'more'
public checkQueue ( ) : void
Результат void
    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();
        }
    }