class_docstr: Given as a parameter to the inputhook.
docstr: Call the inputhook. (Called by a prompt-toolkit eventloop.)
code: def call_inputhook(self, input_is_ready_func):
      """
      Call the inputhook. (Called by a prompt-toolkit eventloop.)
      """
      self._input_is_ready = input_is_ready_func
  
      # Start thread that activates this pipe when there is input to process.
      def thread():
          input_is_ready_func(wait=True)
          os.write(self._w, b"x")
  
      threading.Thread(target=thread).start()
  
      # Call inputhook.
      self.inputhook(self)
  
      # Flush the read end of the pipe.
      try:
          # Before calling 'os.read', call select.select. This is required
          # when the gevent monkey patch has been applied. 'os.read' is never
          # monkey patched and won't be cooperative, so that would block all
          # other select() calls otherwise.
          # See: http://www.gevent.org/gevent.os.html
  
          # Note: On Windows, this is apparently not an issue.
          #       However, if we would ever want to add a select call, it
          #       should use `windll.kernel32.WaitForMultipleObjects`,
          #       because `select.select` can't wait for a pipe on Windows.
          if not is_windows():
              select_fds([self._r], timeout=None)
  
          os.read(self._r, 1024)
      except OSError:
          # This happens when the window resizes and a SIGWINCH was received.
          # We get 'Error: [Errno 4] Interrupted system call'
          # Just ignore.
          pass
      self._input_is_ready = None
  
file_path: catboost/contrib/python/prompt-toolkit/py2/prompt_toolkit/eventloop/inputhook.py
imports: from __future__ import unicode_literals
  import os
  import threading
  from prompt_toolkit.utils import is_windows
  from .select import select_fds
label_desc: Use image node_id 4 for calling the InputHookContext obj's underlying member method code with example usage: obj.call_inputhook(input_is_ready_func) without return types