public function more($cb = null)
    {
        if ($cb !== null) {
            $this->more = $cb;
            $this->moreFirstFlag = true;
            return $this;
        }
        if ($this->more !== null) {
            if ($this->more instanceof \Iterator) {
                iterator:
                $it = $this->more;
                while (!$this->isQueueFull() && $it->valid()) {
                    if ($this->moreFirstFlag) {
                        $this->moreFirstFlag = false;
                    } else {
                        $it->next();
                        if (!$it->valid()) {
                            break;
                        }
                    }
                    $this->addJob($it->key(), $it->current());
                }
            } else {
                $func = $this->more;
                if (($r = $func($this)) instanceof \Iterator) {
                    $this->more = $r;
                    goto iterator;
                }
            }
        }
        return $this;
    }
public function more($cb = null)
    {
        if ($cb !== null) {
            $this->more = $cb;
            $this->moreFirstFlag = true;
            return $this;
        }
        if ($this->more !== null) {
            if ($this->more instanceof \Iterator) {
                iterator:
                $it = $this->more;
                while (!$this->isQueueFull() && $it->valid()) {
                    if ($this->moreFirstFlag) {
                        $this->moreFirstFlag = false;
                    } else {
                        $it->next();
                        if (!$it->valid()) {
                            break;
                        }
                    }
                    $this->addJob($it->key(), $it->current());
                }
            } else {
                $func = $this->more;
                if (($r = $func($this)) instanceof \Iterator) {
                    $this->more = $r;
                    goto iterator;
                }
            }
        }
        return $this;
    }
public function more ( $ cb = null ) { if ( $ cb !== null ) { $ this -> more = $ cb ; $ this -> moreFirstFlag = true ; return $ this ; } if ( $ this -> more !== null ) { if ( $ this -> more instanceof \ Iterator ) { iterator : $ it = $ this -> more ; while ( ! $ this -> isQueueFull ( ) && $ it -> valid ( ) ) { if ( $ this -> moreFirstFlag ) { $ this -> moreFirstFlag = false ; } else { $ it -> next ( ) ; if ( ! $ it -> valid ( ) ) { break ; } } $ this -> addJob ( $ it -> key ( ) , $ it -> current ( ) ) ; } } else { $ func = $ this -> more ; if ( ( $ r = $ func ( $ this ) ) instanceof \ Iterator ) { $ this -> more = $ r ; goto iterator ; } } } return $ this ; }
Sets a callback which is going to be fired always when we have a room for more jobs
@param  callable $cb Callback
@return this
Sets a callback which is going to be fired always when we have a room for more jobs