As long as it has a next link, and is under the maximum limit, will keep running
320148
function check() {
    if (links[currentLink] && currentLink < upTo) {
        this.echo('--- Link ' + currentLink + ' ---');
        start.call(this, links[currentLink]);
        addLinks.call(this, links[currentLink]);
        currentLink++;
        this.run(check);
    } else {
        this.echo("All done.");
        this.exit();
    }
}
572246
public function next()
    {
        if ($this->current === null) {
            $this->rewind();
        }

        if ($this->validationResult !== static::END_ITERATION) {
            $this->key++;

            $this->incrementCurrentDateUntilValid();
        }
    }
108775
def serve_forever(self):
        """"""
        loop = True
        while loop:
            loop = self.__serve_forever()
        self.end()
1199951
def fail_remaining(self):
        
        self._failed.update(self._graph.nodes)
        self._graph = Graph()
        self._running = set()
682578
function runNextRequest(){
		var self = this;

		var req = parser.read()
		if (req){
			var res = new Response(req);
			res.assignSocket(socket)

			//No matter how the response object gets closed this
			//will trigger the next one if there is one.
			res.once('close', function(){
				//Check if there is work.
				if(self.work){
					runNextRequest.call(self)
				} else {
					//Let the system know that you have stopped working
					self.working = false;
				}
			});

			this.emit('request', req, res);		
		}
	}
1294232
public boolean next() {
		while (true) {
			currentSlot++;
			if (!isOverflowing) { // not in an overflow block
				// if it reached the end of the block
				if (currentSlot >= currentPage.getNumRecords()) {
					if (getSiblingFlag(currentPage) != -1) {
						moveTo(getSiblingFlag(currentPage), -1);
						continue;
					}
					return false;
					// if the key of this slot match what we want
				} else if (searchRange.match(getKey(currentPage, currentSlot, keyType.length()))) {
					/*
					 * Move to records in overflow blocks first. An overflow block
					 * cannot be empty.
					 */
					if (currentSlot == 0 && getOverflowFlag(currentPage) != -1) {
						isOverflowing = true;
						overflowFrom = currentPage.currentBlk().number();
						moveTo(getOverflowFlag(currentPage), 0);
					}
					return true;
				} else if (searchRange.betweenMinAndMax(getKey(currentPage, currentSlot, keyType.length()))) {
					continue;
				} else
					return false;
			} else { // in an overflow block
				// All the records in an overflow block have the same key
				// so that we do not need to check the key in an overflow block.
				
				if (currentSlot >= currentPage.getNumRecords()) {
					moveTo(getOverflowFlag(currentPage), 0);
					/*
					 * Move back to the first record in the regular block finally.
					 */
					if (currentPage.currentBlk().number() == overflowFrom) {
						isOverflowing = false;
						overflowFrom = -1;
					}
				}
				
				return true;
			}
		}
	}
1213070
def maybe_rate_limit(client, headers, atexit=False):
    """"""
    # pylint: disable=fixme
    # pylint: disable=global-statement
    # FIXME: Yes, I know this is not great. We'll fix it later. :-)
    global LAST_CLIENT, LAST_HEADERS

    if LAST_CLIENT and LAST_HEADERS:
        # Wait based on previous client/headers
        rate_limit(LAST_CLIENT, LAST_HEADERS, atexit=atexit)

    LAST_CLIENT = copy.copy(client)
    LAST_HEADERS = copy.copy(headers)
1295149
function followLink(href, event) {
		if (event && openInNewWindow(event)) {
			window.open(urlModifier(href));
		} else {
			window.location = urlModifier(href);
		}
	}
996013
private function addNextRequests()
    {
        $limit = max($this->getPoolSize() - count($this->waitQueue), 0);
        while ($limit--) {
            if (!$this->addNextRequest()) {
                break;
            }
        }
    }
972517
def maintainConnections(self, force=False):
        
        now = time.perf_counter()
        if now < self.nextCheck and not force:
            return False
        self.nextCheck = now + (self.config.RETRY_TIMEOUT_NOT_RESTRICTED
                                if self.isKeySharing
                                else self.config.RETRY_TIMEOUT_RESTRICTED)
        missing = self.connectToMissing()
        self.retryDisconnected(exclude=missing)
        logger.trace("{} next check for retries in {:.2f} seconds"
                     .format(self, self.nextCheck - now))
        return True
123967
function() {
			if (!this.remain.length) { return false; }
			var next		= this.remain.shift();
			this.absolute	= URL.absolute(this.url, next);
			return true;
		}
996512
public boolean isEmbedLinkUrlExpired(){
        Long urlCreationTime = getUrlCreationTime();
        if (urlCreationTime == null){
            return true;
        }
        return (System.currentTimeMillis() - urlCreationTime) < (60 * 1000);
    }
70405
def _follow_link(self, value):
    ''''''
    seen_keys = set()
    while True:
      link_key = self._link_for_value(value)
      if not link_key:
        return value

      assert link_key not in seen_keys, 'circular symlink reference'
      seen_keys.add(link_key)
      value = super(SymlinkDatastore, self).get(link_key)
823681
def _try_next(self, get_more_allowed):
        """"""
        if not len(self.__data) and not self.__killed and get_more_allowed:
            self._refresh()
        if len(self.__data):
            coll = self.__collection
            return coll.database._fix_outgoing(self.__data.popleft(), coll)
        else:
            return None
858408
def goForward(self):
        
        if not self.canGoForward():
            return ''
        
        self._blockStack = True
        self._index += 1
        self.emitCurrentChanged()
        self._blockStack = False
        return self.currentUrl()
450435
def run_forever(self) -> None:
        ''''''

        Log.debug('running event loop until terminated')
        asyncio.ensure_future(self.init())
        self.loop.run_forever()
        self.loop.close()
1038570
def next_page(self):
        
        if self.is_last_page():
            return False

        self.page += 1
        self.items = self.fetch_items()
        return True