MCPcopy Create free account
hub / github.com/PRIME-RL/PRIME / signal_handler

Function signal_handler

eval/utils/execution_leetcode.py:592–593  ·  view source on GitHub ↗
(signum, frame)

Source from the content-addressed store, hash-verified

590@contextlib.contextmanager
591def time_limit(seconds: float):
592 def signal_handler(signum, frame):
593 raise TimeoutException("Timed out!")
594
595 signal.setitimer(signal.ITIMER_REAL, seconds)
596 signal.signal(signal.SIGALRM, signal_handler)

Callers

nothing calls this directly

Calls 1

TimeoutExceptionClass · 0.70

Tested by

no test coverage detected