MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / scoped_server

Function scoped_server

subprojects/llama.cpp/scripts/tool_bench.py:60–68  ·  view source on GitHub ↗
(sp: ServerProcess)

Source from the content-addressed store, hash-verified

58
59@contextmanager
60def scoped_server(sp: ServerProcess):
61 def stop():
62 nonlocal sp
63 if sp is not None:
64 sp.stop()
65 sp = None # type: ignore
66 atexit.register(stop)
67 yield sp
68 stop()
69
70
71logging.basicConfig(

Callers 1

runFunction · 0.85

Calls 2

stopFunction · 0.70
registerMethod · 0.65

Tested by

no test coverage detected