MCPcopy Create free account
hub / github.com/su-kaka/gcli2api / __init__

Method __init__

src/task_manager.py:25–33  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

23 return cls._instance
24
25 def __init__(self):
26 if self._initialized:
27 return
28
29 self._tasks: Set[asyncio.Task] = set()
30 self._resources: Set[Any] = set() # 需要关闭的资源
31 self._shutdown_event = asyncio.Event()
32 self._initialized = True
33 log.debug("TaskManager initialized")
34
35 def register_task(self, task: asyncio.Task, description: str = None) -> asyncio.Task:
36 """注册一个任务供生命周期管理"""

Callers

nothing calls this directly

Calls 1

debugMethod · 0.80

Tested by

no test coverage detected