docstr: Called by IOLoop when the requested timeout has passed.
docstr_tok: ["Called","by","IOLoop","when","the","requested","timeout","has","passed","."]
code: def _handle_timeout(self):
      """Called by IOLoop when the requested timeout has passed."""
      with stack_context.NullContext():
          self._timeout = None
          while True:
              try:
                  ret, num_handles = self._multi.socket_action(
                      pycurl.SOCKET_TIMEOUT, 0
                  )
              except pycurl.error as e:
                  ret = e.args[0]
              if ret != pycurl.E_CALL_MULTI_PERFORM:
                  break
          self._finish_pending_requests()
  
      # In theory, we shouldn't have to do this because curl will
      # call _set_timeout whenever the timeout changes.  However,
      # sometimes after _handle_timeout we will need to reschedule
      # immediately even though nothing has changed from curl's
      # perspective.  This is because when socket_action is
      # called with SOCKET_TIMEOUT, libcurl decides internally which
      # timeouts need to be processed by using a monotonic clock
      # (where available) while tornado uses python's time.time()
      # to decide when timeouts have occurred.  When those clocks
      # disagree on elapsed time (as they will whenever there is an
      # NTP adjustment), tornado might call _handle_timeout before
      # libcurl is ready.  After each timeout, resync the scheduled
      # timeout with libcurl's current state.
      new_timeout = self._multi.timeout()
      if new_timeout >= 0:
          self._set_timeout(new_timeout)
  
imports: from __future__ import absolute_import, division, print_function
  import collections
  import functools
  import logging
  import pycurl
  import threading
  import time
  from io import BytesIO
  from tornado import httputil
  from tornado import ioloop
  from tornado import stack_context
  from tornado.escape import utf8, native_str
  from tornado.httpclient import HTTPResponse, HTTPError, AsyncHTTPClient, main
label_desc: Use image node_id 7 for calling the CurlAsyncHTTPClient obj's underlying member method code with example usage: obj._handle_timeout() without return types