(
self, receive: ASGIReceiveCallable, send: ASGISendCallable
)
| 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 |
nothing calls this directly
no test coverage detected