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

Method StopLoop

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

Source from the content-addressed store, hash-verified

95
96 @classmethod
97 def StopLoop(cls):
98 assert cls._loop is not None, "Loop is not started"
99 assert cls._thread is not None, "Thread is not started"
100
101 def stop_loop():
102 cls._logger.debug("Stopping the loop!")
103 cls._loop.stop()
104
105 cls._logger.info("Waiting for remaining tasks to finish")
106 cls.WaitLoop()
107
108 cls._loop.call_soon_threadsafe(stop_loop)
109 cls._thread.join()
110
111 @classmethod
112 def GetLoop(cls) -> asyncio.AbstractEventLoop:

Callers 1

mainFunction · 0.45

Calls 1

WaitLoopMethod · 0.45

Tested by

no test coverage detected