def __init__(self):
        super().__init__()
        self._handling_lock = Lock()
        self._teardown_callback_stack = LifoQueue()  # we execute callbacks in the reverse order that they were added
        self._logger = log.get_logger(__name__)
        self._handled_exceptions = Queue()
        self._teardown_callback_raised_exception = False

        # Set up handlers to be called when the application process receives certain signals.
        # Note: this will raise if called on a non-main thread, but we should NOT work around that here. (That could
        # prevent the teardown handler from ever being registered!) Calling code should be organized so that this
        # singleton is only ever initialized on the main thread.
        signal.signal(signal.SIGTERM, self._application_teardown_signal_handler)
        signal.signal(signal.SIGINT, self._application_teardown_signal_handler)
        try:
            signal.signal(process_utils.SIGINFO, self._application_info_dump_signal_handler)
        except __HOLE__:
            self._logger.warning('Failed to register signal handler for SIGINFO. This is expected if ClusterRunner '
                                 'is running on Windows.')
dataset/ETHPy150Open box/ClusterRunner/app/util/unhandled_exception_handler.py/UnhandledExceptionHandler.__init__