| 1508 | |
| 1509 | |
| 1510 | class RadosThread(threading.Thread): |
| 1511 | def __init__(self, func, *args, **kwargs): |
| 1512 | self.args = args |
| 1513 | self.kwargs = kwargs |
| 1514 | self.func = func |
| 1515 | self.exception = None |
| 1516 | threading.Thread.__init__(self) |
| 1517 | |
| 1518 | def run(self): |
| 1519 | try: |
| 1520 | self.retval = self.func(*self.args, **self.kwargs) |
| 1521 | except Exception as e: |
| 1522 | self.exception = e |
| 1523 | |
| 1524 | |
| 1525 | def run_in_thread(func: Callable[[Any, Any], Tuple[int, bytes, str]], |