MCPcopy Create free account
hub / github.com/THESIS-AGENT/AIRouter / timeout_handler

Function timeout_handler

ew_decorator/with_timeout.py:10–12  ·  view source on GitHub ↗

超时信号处理函数

(signum, frame)

Source from the content-addressed store, hash-verified

8
9# 定义 with_timeout 装饰器
10def timeout_handler(signum, frame):
11 """超时信号处理函数"""
12 raise TimeoutError("操作超时")
13
14def with_timeout(timeout_param=None, default_seconds=300):
15 """函数超时装饰器

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected