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;
}