def set_hook_as_ready(cls):
        """Flush the queue and disable it for future exceptions."""
        if cls._is_exc_hook_ready:
            return
        cls._is_exc_hook_ready = True
        while cls._exc_queue.qsize() > 0:
            e = cls._exc_queue.get()
            cls._send_exception_to_crash_reporter(e)
Flush the queue and disable it for future exceptions.
electrum/base_crash_reporter.py