| 5 | |
| 6 | |
| 7 | class _PropagatingThread(Thread): |
| 8 | def run(self): |
| 9 | self.exc = None |
| 10 | try: |
| 11 | self.ret = self._target(*self._args, **self._kwargs) |
| 12 | except BaseException as e: |
| 13 | self.exc = e |
| 14 | |
| 15 | def join(self, timeout=None): |
| 16 | super().join(timeout) |
| 17 | if self.exc: |
| 18 | raise self.exc |
| 19 | return self.ret |
| 20 | |
| 21 | |
| 22 | def function_with_timeout(func, args, timeout): |
no outgoing calls
no test coverage detected