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

Method restart

tests/conftest.py:245–254  ·  tests/conftest.py::TestServer.restart
(self)

Source from the content-addressed store, hash-verified

243 await asyncio.wait(tasks)
244
245 async def restart(self) -> None: class="cm"># pragma: no cover
246 class="cm"># This coroutine may be called from a different thread than the one the
247 class="cm"># server is running on, and from an async environment that's not asyncio.
248 class="cm"># For this reason, we use an event to coordinate with the server
249 class="cm"># instead of calling shutdown()/startup() directly, and should not make
250 class="cm"># 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: class="cm"># 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