MCPcopy Create free account
hub / github.com/BUPT-GAMMA/MASFactory / _PropagatingThread

Class _PropagatingThread

applications/lats/humaneval/timeout_utils.py:7–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5
6
7class _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
22def function_with_timeout(func, args, timeout):

Callers 1

function_with_timeoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected