MCPcopy Create free account
hub / github.com/pallets/quart / __call__

Method __call__

src/quart/asgi.py:50–60  ·  view source on GitHub ↗
(
        self, receive: ASGIReceiveCallable, send: ASGISendCallable
    )

Source from the content-addressed store, hash-verified

48 self.scope = scope
49
50 async def __call__(
51 self, receive: ASGIReceiveCallable, send: ASGISendCallable
52 ) -> None:
53 request = self._create_request_from_scope(send)
54 receiver_task = asyncio.ensure_future(self.handle_messages(request, receive))
55 handler_task = asyncio.ensure_future(self.handle_request(request, send))
56 done, pending = await asyncio.wait(
57 [handler_task, receiver_task], return_when=asyncio.FIRST_COMPLETED
58 )
59 await cancel_tasks(pending)
60 raise_task_exceptions(done)
61
62 async def handle_messages(
63 self, request: Request, receive: ASGIReceiveCallable

Callers

nothing calls this directly

Calls 5

handle_messagesMethod · 0.95
handle_requestMethod · 0.95
cancel_tasksFunction · 0.85
raise_task_exceptionsFunction · 0.85

Tested by

no test coverage detected