(func: Callable[[], Awaitable[T]])
| 117 | async with anyio.create_task_group() as task_group: |
| 118 | |
| 119 | async def wrap(func: Callable[[], Awaitable[T]]) -> T: |
| 120 | result = await func() |
| 121 | task_group.cancel_scope.cancel() |
| 122 | return result |
| 123 | |
| 124 | task_group.start_soon(wrap, response_sent.wait) |
| 125 | message = await wrap(wrapped_receive) |