class_docstr: A Windows-specific daemon thread that listens for a special event that
  signals an interrupt and, optionally, terminates the program immediately
  when the parent process no longer exists.
class_docstr_tok: ["A","Windows-specific","daemon","thread","that","listens","for","a","special","event","that","signals","an","interrupt","and",",","optionally",",","terminates","the","program","immediately","when","the","parent","process","no","longer","exists","."]
docstr: Create the poller. At least one of the optional parameters must be
  provided.
  
  Parameters
  ----------
  interrupt_handle : HANDLE (int), optional
      If provided, the program will generate a Ctrl+C event when this
      handle is signaled.
  parent_handle : HANDLE (int), optional
      If provided, the program will terminate immediately when this
      handle is signaled.
docstr_tok: ["Create","the","poller",".","At","least","one","of","the","optional","parameters","must","be","provided",".","Parameters","--","--","--","--","--","interrupt_handle",":","HANDLE","(","int",")",",","optional","If","provided",",","the","program","will","generate","a","Ctrl+C","event","when","this","handle","is","signaled",".","parent_handle",":","HANDLE","(","int",")",",","optional","If","provided",",","the","program","will","terminate","immediately","when","this","handle","is","signaled","."]
code: def __init__(self, interrupt_handle=None, parent_handle=None):
      """Create the poller. At least one of the optional parameters must be
      provided.
  
      Parameters
      ----------
      interrupt_handle : HANDLE (int), optional
          If provided, the program will generate a Ctrl+C event when this
          handle is signaled.
      parent_handle : HANDLE (int), optional
          If provided, the program will terminate immediately when this
          handle is signaled.
      """
      assert interrupt_handle or parent_handle
      super().__init__()
      if ctypes is None:
          msg = (
              "ParentPollerWindows requires ctypes"
          )  # type:ignore[unreachable]
          raise ImportError(msg)
      self.daemon = True
      self.interrupt_handle = interrupt_handle
      self.parent_handle = parent_handle
  
file_path: catboost/contrib/python/ipykernel/py3/ipykernel/parentpoller.py
imports: import os
  import platform
  import signal
  import time
  import warnings
  from _thread import interrupt_main
  from threading import Thread
  from traitlets.log import get_logger
label_desc: Use image node_id 1 to create a new ParentPollerWindows object from inherited base classes: Thread with example: obj = ParentPollerWindows(interrupt_handle, parent_handle)