MCPcopy
hub / github.com/encode/uvicorn / main_loop

Method main_loop

uvicorn/server.py:232–239  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

230 )
231
232 async def main_loop(self) -> None:
233 counter = 0
234 should_exit = await self.on_tick(counter)
235 while not should_exit:
236 counter += 1
237 counter = counter % 864000
238 await asyncio.sleep(0.1)
239 should_exit = await self.on_tick(counter)
240
241 async def on_tick(self, counter: int) -> bool:
242 # Update the default headers, once per second.

Callers 1

_serveMethod · 0.95

Calls 1

on_tickMethod · 0.95

Tested by

no test coverage detected