MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / _get_batch_lock

Function _get_batch_lock

src/web/task_manager.py:66–72  ·  view source on GitHub ↗

线程安全地获取或创建批量任务日志锁

(batch_id: str)

Source from the content-addressed store, hash-verified

64
65
66def _get_batch_lock(batch_id: str) -> threading.Lock:
67 """线程安全地获取或创建批量任务日志锁"""
68 if batch_id not in _batch_locks:
69 with _meta_lock:
70 if batch_id not in _batch_locks:
71 _batch_locks[batch_id] = threading.Lock()
72 return _batch_locks[batch_id]
73
74
75class TaskManager:

Callers 4

add_batch_logMethod · 0.85
get_batch_logsMethod · 0.85
get_unsent_batch_logsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected