生成 next_call 的调用
        使用迭代器，这个方法每调用一次都会指向下一个中间件。
186435
def _next_middleware(
            self,
            middlewares: Iterator[MIDDLEWARE_TYPE],
            ctx: Context,
    ) -> NEXT_CALL_TYPE:
        
        @asyncio.coroutine
        def next_call() -> NEXT_CALL_RES_TYPE:
            """
            调用下一个中间件
            """
            yield from self._middleware_call(middlewares, ctx, next_call)
        return next_call
811906
public function getNextCaller()
    {
        $callStack = $this;

        $next = function() use($callStack, &$next)
        {
            $args = func_get_args();

            $args[] = $next;

            return call_user_func_array(array($callStack, 'next'), $args);
        };

        return $next;
    }
692010
def __get_calls_from_parser(proxy_parser, real_parser):
    
    __parsers[proxy_parser] = real_parser
    for method, safe, args, kwargs, proxy_subparser in proxy_parser.calls:
        args = (__proxy_to_real_parser(v) for v in args)
        kwargs = {k: __proxy_to_real_parser(v) for k, v in kwargs.items()}
        real_subparser = getattr(real_parser, method)(*args, **kwargs)
        if real_subparser is not None:
            __get_calls_from_parser(proxy_subparser, real_subparser)
727189
def next_batch(self):
        
        is_success, results = AtlasRequest(
            url_path=self.atlas_url,
            user_agent=self._user_agent,
            server=self.server,
            verify=self.verify,
        ).get()

        if not is_success:
            raise APIResponseError(results)

        self.total_count = results.get("count")
        self.atlas_url = self.build_next_url(results.get("next"))
        self.current_batch = results.get("results", [])
1322313
def call_at_most_every(seconds, count=1):
  
  def decorator(func):
    try:
      call_history = getattr(func, '_call_history')
    except AttributeError:
      call_history = collections.deque(maxlen=count)
      setattr(func, '_call_history', call_history)

    @functools.wraps(func)
    def _wrapper(*args, **kwargs):
      current_time = time.time()
      window_count = sum(ts > current_time - seconds for ts in call_history)
      if window_count >= count:
        # We need to sleep until the relevant call is outside the window.  This
        # should only ever be the the first entry in call_history, but if we
        # somehow ended up with extra calls in the window, this recovers.
        time.sleep(call_history[window_count - count] - current_time + seconds)
      # Append this call, deque will automatically trim old calls using maxlen.
      call_history.append(time.time())
      return func(*args, **kwargs)
    return _wrapper
  return decorator
722418
def next(self):
        
        next_index = (self.index + 1) % len(self._browser.driver.window_handles)
        next_handle = self._browser.driver.window_handles[next_index]
        return Window(self._browser, next_handle)
1082895
def call_next(self):
        """"""
        if self.handle is not None:
            self.handle.cancel()
        next_time = self.get_next()
        self.handle = self.loop.call_at(next_time, self.call_next)
        self.call_func()
739201
@Override
	public IncomingRemoteCallTracer traceIncomingRemoteCall(String remoteMethod, String remoteService,
			String clientEndpoint) {
		return RemoteCallServerTracerNoop.INSTANCE;
	}
835439
def system_multicall(self, call_list):
        

        results = []
        for call in call_list:
            method_name = call['methodName']
            params = call['params']

            try:
                # XXX A marshalling error in any response will fail the entire
                # multicall. If someone cares they should fix this.
                results.append([self._dispatch(method_name, params)])
            except Fault as fault:
                results.append(
                    {'faultCode' : fault.faultCode,
                     'faultString' : fault.faultString}
                    )
            except:
                exc_type, exc_value, exc_tb = sys.exc_info()
                results.append(
                    {'faultCode' : 1,
                     'faultString' : "%s:%s" % (exc_type, exc_value)}
                    )
        return results
780462
def request_get_next(request, default_next):
    
    next_url = request.POST.get('next')\
        or request.GET.get('next')\
        or request.META.get('HTTP_REFERER')\
        or default_next
    return next_url
1195850
def create_call(self, raw_request, **kwargs):
        """"""
        req = self.create_request(raw_request, **kwargs)
        res = self.create_response(**kwargs)
        rou = self.create_router(**kwargs)
        c = self.call_class(req, res, rou)
        return c
1195935
function next(cursor, callback) {
  // Return the currentDoc if someone called hasNext first
  if (cursor.s.currentDoc) {
    const doc = cursor.s.currentDoc;
    cursor.s.currentDoc = null;
    return callback(null, doc);
  }

  // Return the next object
  nextObject(cursor, callback);
}
276648
def call(self, fn, *args, **kwargs):
        
        return self.default_call_chain.call(fn, *args, **kwargs)
451194
def make_call(self, fun, *args):
        """"""

        obj = {"fn": fun, "args": list(args)}
        obj = [self.proto.max_id, [[0, ["call", obj]], self.proto.send_count]]
        self.send_message(f"4{to_json(obj)}")
        self.proto.send_count += 1
449456
public boolean makeCalls(long now) {
    if (now < nextDispatchTime)
      return true;

    // we make calls in a loop until all pending calls are drained
    // if any call hits an error - we stop
    while (!pendingCalls.isEmpty()) {

      TBase call = pendingCalls.get(0);
      try {
        // initialize the client/transport unless already done
        init();

        // make one thrift call
        dispatchCall(call);

        // if we made a call successfully, reset any retry state
        nextDispatchTime = -1;
        numRetries = 0;
        currentRetryInterval = retryIntervalStart;

        pendingCalls.remove(0);

      } catch (TException e) {
        boolean logged = false;
        if (e instanceof TTransportException) {
          TTransportException tte = (TTransportException) e;
          Throwable cause =  tte.getCause();
          if (cause != null && cause instanceof SocketTimeoutException) {
            // Got a socket timeout while waiting for a response from the
            // client. The session is stuck.
            logged = true;
            LOG.error("Call to session: " + handle + " for call: " +
              call.getClass().getName() + ", numRetry: " + numRetries +
              "(retryCountMax=" + retryCountMax + ")" +
              " failed with SocketTimeoutException, will retry it");
          }
        }
        if (!logged) {
          LOG.warn("Call to session: " + handle + " for call: " +
            call.getClass().getName() + ", numRetry: " + numRetries +
            "(retryCountMax=" + retryCountMax + ")" +
            " failed with TException", e);
        }

        // close the transport/client on any exception
        // will be reopened on next try
        close();

        if (numRetries > retryCountMax)
          return false;

        numRetries++;
        nextDispatchTime = now + currentRetryInterval;
        currentRetryInterval *= retryIntervalFactor;

        // no more calls for now
        return true;
      }
    }

    close();

    return true;
  }
822908
function callNext(list, results, propogate) {
    var ret = new Promise().callback();
    forEach(list, function (listItem) {
        ret = ret.chain(propogate ? listItem : bindIgnore(null, listItem));
        if (!propogate) {
            ret.addCallback(function (res) {
                results.push(res);
                res = null;
            });
        }
    });
    return propogate ? ret.promise() : ret.chain(results);
}
1308270
public function getNextCallable()
    {
        if(!$this->initiated)
        {
            reset($this->callables);

            $this->initiated = true;

            return current($this->callables);
        }

        return next($this->callables);
    }