MCPcopy Create free account
hub / github.com/LMCache/LMBenchmark / StartLoop

Method StartLoop

agentic/utils.py:80–94  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

78
79 @classmethod
80 def StartLoop(cls):
81 if cls._loop is not None:
82 cls._logger.warning("Loop is already started")
83 return
84
85 if cls._loop is None:
86 cls._loop = asyncio.new_event_loop()
87
88 def run_loop():
89 asyncio.set_event_loop(cls._loop)
90 cls._logger.debug("Starting the asyncio loop")
91 cls._loop.run_forever()
92
93 cls._thread = threading.Thread(target=run_loop)
94 cls._thread.start()
95
96 @classmethod
97 def StopLoop(cls):

Callers 1

GetOrStartLoopMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected