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

Method StartLoop

benchmarks/rag/utils.py:92–106  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

90
91 @classmethod
92 def StartLoop(cls):
93 if cls._loop is not None:
94 cls._logger.warning("Loop is already started")
95 return
96
97 if cls._loop is None:
98 cls._loop = asyncio.new_event_loop()
99
100 def run_loop():
101 asyncio.set_event_loop(cls._loop)
102 cls._logger.debug("Starting the asyncio loop")
103 cls._loop.run_forever()
104
105 cls._thread = threading.Thread(target=run_loop)
106 cls._thread.start()
107
108 @classmethod
109 def StopLoop(cls):

Callers 1

GetOrStartLoopMethod · 0.45

Calls 1

startMethod · 0.45

Tested by

no test coverage detected