MCPcopy Create free account
hub / github.com/zai-org/CodeGeeX / signal_handler

Function signal_handler

codegeex/benchmark/execution.py:410–411  ·  view source on GitHub ↗
(signum, frame)

Source from the content-addressed store, hash-verified

408@contextlib.contextmanager
409def time_limit(seconds: float):
410 def signal_handler(signum, frame):
411 raise TimeoutException("Timed out!")
412
413 signal.setitimer(signal.ITIMER_REAL, seconds)
414 signal.signal(signal.SIGALRM, signal_handler)

Callers

nothing calls this directly

Calls 1

TimeoutExceptionClass · 0.85

Tested by

no test coverage detected