This is always called through _.throttle (except once at startup).
764259
function () {
    var self = this;
    if (self._pollsScheduledButNotStarted > 0)
      return;
    ++self._pollsScheduledButNotStarted;
    self._taskQueue.queueTask(function () {
      self._pollMongo();
    });
  }
423091
function() {
            if(settings.throttle) {
              clearTimeout(module.timer);
              module.timer = setTimeout(function() {
                $context.triggerHandler('scrollchange' + eventNamespace, [ $context.scrollTop() ]);
              }, settings.throttle);
            }
            else {
              requestAnimationFrame(function() {
                $context.triggerHandler('scrollchange' + eventNamespace, [ $context.scrollTop() ]);
              });
            }
          }
468933
def __initLock(self):
        """"""
        self._isLocked = False
        self._timer = 0
        self._operation = False
1070063
def alwaysThrew(self, error_type=None): #pylint: disable=invalid-name
        
        if self.callCount == 0:
            return False
        if not error_type:
            return True if len(self.exceptions) == self.callCount else False
        else:
            return uch.obj_in_list_always(self.exceptions, error_type)
924522
def on_startup(self):
        

        LOGGER.debug("> Calling '{0}' Component Framework 'on_startup' method.".format(self.__class__.__name__))

        self.refresh_nodes.emit()
        return True
689914
def throttle(self, key, amount=1, rate=None, capacity=None,
            exc_class=Throttled, **kwargs):
        """"""

        if not self.consume(key, amount, rate, capacity, **kwargs):
            raise exc_class("Request of %d unit for %s exceeds capacity."
                    % (amount, key))
728196
def throttle_connection_rate
      now = Time.now
      delta = now - (last_new_connection_at || now)
      _throttle(delta, now) if delta < OandaAPI.configuration.min_new_connection_interval &&
                                       OandaAPI.configuration.use_request_throttling?
      self.last_new_connection_at = Time.now
    end
679433
def _suspend(self):
        
        engine = self.current_engine()
        if "vm" in self._controller.computes:
            yield from self._controller.delete_compute("vm")
        if engine.running:
            log.info("")
            yield from engine.suspend()
238907
public MockResponse throttleBody(long bytesPerPeriod, long period, TimeUnit unit) {
    this.throttleBytesPerPeriod = bytesPerPeriod;
    this.throttlePeriodAmount = period;
    this.throttlePeriodUnit = unit;
    return this;
  }
994472
function start() {
      var _this = this;

      if (Glide.settings.autoplay) {
        if (isUndefined(this._i)) {
          this._i = setInterval(function () {
            _this.stop();

            Components.Run.make('>');

            _this.start();
          }, this.time);
        }
      }
    }
1243880
def run_forever(self):
        
        self.starting()
        self.keep_running = True

        def handle(signum, frame):
            self.interrupt()
            self.keep_running = False

        signal.signal(signal.SIGINT, handle)

        while self.keep_running:
            if self.max_tasks and self.tasks_complete >= self.max_tasks:
                self.stopping()

            if self.gator.len():
                result = self.gator.pop()
                self.tasks_complete += 1
                self.result(result)

            if self.nap_time >= 0:
                time.sleep(self.nap_time)

        return 0
91569
def call_repeatedly(func, interval, *args, **kwargs):
    
    main_thead = threading.current_thread()
    stopped = threading.Event()

    def loop():
        while not stopped.wait(interval) and main_thead.is_alive():  # the first call is in `interval` secs
            func(*args, **kwargs)

        return

    timer_thread = threading.Thread(target=loop, daemon=True)
    timer_thread.start()

    atexit.register(stopped.set)

    return timer_thread, stopped.set
372034
def on_startup(self):
        

        LOGGER.debug("> Calling '{0}' Component Framework 'on_startup' method.".format(self.__class__.__name__))

        if self.Autostart_TCP_Server_checkBox.isChecked():
            if not self.__tcp_server.online:
                self.__tcp_server.port = self.Port_spinBox.value()
                self.__tcp_server.start()
        return True
275281
def throttle(self, wait):
        
        ns = self.Namespace()
        ns.timeout = None
        ns.throttling = None
        ns.more = None
        ns.result = None

        def done():
            ns.more = ns.throttling = False

        whenDone = _.debounce(done, wait)
        wait = (float(wait) / float(1000))

        def throttled(*args, **kwargs):
            def later():
                ns.timeout = None
                if ns.more:
                    self.obj(*args, **kwargs)
                whenDone()

            if not ns.timeout:
                ns.timeout = Timer(wait, later)
                ns.timeout.start()

            if ns.throttling:
                ns.more = True
            else:
                ns.throttling = True
                ns.result = self.obj(*args, **kwargs)
            whenDone()
            return ns.result
        return self._wrap(throttled)
236849
function throttle(func, /* istanbul ignore next */ limit = 200) {
  let wait = false;

  return () => {
    if (!wait) {
      func.call();
      wait = true;
      setTimeout(() => {
        wait = false;
      }, limit);
    }
  };
}
807197
def _EnsureRequesterStarted(self):
    """"""
    if not self._analyzer_started:
      self._analyzer.start()
      self._analyzer_started = True
350372
function throttleMiddleware (request, response, next) {
    var ip = null

    if (config.useCustomHeader && request.headers[config.useCustomHeader]) {
      ip = request.headers[config.useCustomHeader]
    } else {
      ip = request.headers['x-forwarded-for'] ||
        request.connection.remoteAddress ||
        request.socket.remoteAddress ||
        request.connection.socket.remoteAddress || ''

      ip = ip.split(',')[0]
      if (!ipRegex().test(ip) || ip.substr(0, 7) === '::ffff:' || ip === '::1') {
        ip = '127.0.0.1'
      } else {
        ip = ip.match(ipRegex())[0]
      }
    }

    Throttle
      .findOneAndUpdate({ip: ip}, { $inc: { hits: 1 } }, { upsert: false })
      .exec(function (error, throttle) {
        if (errHandler(response, next, error)) { return }
        if (!throttle) {
          throttle = new Throttle({
            createdAt: new Date(),
            ip: ip
          })
          throttle.save(function (error, throttle) {
            // THERE'S NO ERROR, BUT THROTTLE WAS NOT SAVE
            if (!throttle && !error) {
              error = new Error('Error checking rate limit.')
            }

            if (errHandler(response, next, error)) { return }

            respondWithThrottle(request, response, next, throttle)
          })
        } else {
          respondWithThrottle(request, response, next, throttle)
        }
      })
  }