(self)
| 114 | traceback.print_exc(None, sys.stderr) |
| 115 | |
| 116 | def run(self): |
| 117 | body = self.body |
| 118 | shutdown_set = self.__is_shutdown.is_set |
| 119 | try: |
| 120 | while not shutdown_set(): |
| 121 | try: |
| 122 | body() |
| 123 | except Exception as exc: # pylint: disable=broad-except |
| 124 | try: |
| 125 | self.on_crash('{0!r} crashed: {1!r}', self.name, exc) |
| 126 | self._set_stopped() |
| 127 | finally: |
| 128 | sys.stderr.flush() |
| 129 | os._exit(1) # exiting by normal means won't work |
| 130 | finally: |
| 131 | self._set_stopped() |
| 132 | |
| 133 | def _set_stopped(self): |
| 134 | try: |
nothing calls this directly
no test coverage detected