MCPcopy Create free account
hub / github.com/encode/starlette / ASGIRunner

Class ASGIRunner

benchmarks/_utils.py:44–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42
43
44class ASGIRunner:
45 def __init__(self) -> None:
46 self.loop = asyncio.new_event_loop()
47
48 def run(self, app: ASGIApp, scope: Scope, receive: Receive = unreadable_receive) -> list[Message]:
49 return self.loop.run_until_complete(run_asgi(app, scope, receive))
50
51 def close(self) -> None:
52 self.loop.run_until_complete(self.loop.shutdown_asyncgens())
53 self.loop.close()

Callers 3

test_gzipFunction · 0.90
test_gzip_bypassFunction · 0.90
asgi_runnerFunction · 0.90

Calls

no outgoing calls

Tested by 3

test_gzipFunction · 0.72
test_gzip_bypassFunction · 0.72
asgi_runnerFunction · 0.72