MCPcopy
hub / github.com/encode/httpx / restart

Method restart

tests/conftest.py:245–254  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

243 await asyncio.wait(tasks)
244
245 async def restart(self) -> None: # pragma: no cover
246 # This coroutine may be called from a different thread than the one the
247 # server is running on, and from an async environment that's not asyncio.
248 # For this reason, we use an event to coordinate with the server
249 # instead of calling shutdown()/startup() directly, and should not make
250 # any asyncio-specific operations.
251 self.started = False
252 self.restart_requested.set()
253 while not self.started:
254 await sleep(0.2)
255
256 async def watch_restarts(self) -> None: # pragma: no cover
257 while True:

Callers

nothing calls this directly

Calls 2

sleepFunction · 0.90
setMethod · 0.45

Tested by

no test coverage detected