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

Method StopLoop

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

Source from the content-addressed store, hash-verified

107
108 @classmethod
109 def StopLoop(cls):
110 assert cls._loop is not None, "Loop is not started"
111 assert cls._thread is not None, "Thread is not started"
112
113 def stop_loop():
114 cls._logger.debug("Stopping the loop!")
115 cls._loop.stop()
116
117 cls._logger.info("Waiting for remaining tasks to finish")
118 cls.WaitLoop()
119
120 cls._loop.call_soon_threadsafe(stop_loop)
121 cls._thread.join()
122
123 @classmethod
124 def GetLoop(cls) -> asyncio.AbstractEventLoop:

Callers 1

run_ragFunction · 0.45

Calls 1

WaitLoopMethod · 0.45

Tested by

no test coverage detected