(self)
| 59 | traceback.print_exc(None, sys.stderr) |
| 60 | |
| 61 | def run(self): |
| 62 | body = self.body |
| 63 | shutdown_set = self.__is_shutdown.is_set |
| 64 | try: |
| 65 | while not shutdown_set(): |
| 66 | try: |
| 67 | body() |
| 68 | except Exception as exc: # pylint: disable=broad-except |
| 69 | try: |
| 70 | self.on_crash('{0!r} crashed: {1!r}', self.name, exc) |
| 71 | self._set_stopped() |
| 72 | finally: |
| 73 | sys.stderr.flush() |
| 74 | os._exit(1) # exiting by normal means won't work |
| 75 | finally: |
| 76 | self._set_stopped() |
| 77 | |
| 78 | def _set_stopped(self): |
| 79 | try: |
nothing calls this directly
no test coverage detected