Module

_timeouts

Shared request-input and response-output timeout helpers.

Functions

receive_with_timeout 2 T ▼
Read one request-body event, bounded by ``request_timeout``.
async
async def receive_with_timeout(queue: Queue[T], timeout: float) -> T
Parameters
Name Type Description
queue Queue[T]
timeout float
Returns
T
drain_with_timeout 2 None ▼
Flush buffered response bytes, closing a pathologically slow peer.
async
async def drain_with_timeout(writer: StreamWriter, timeout: float) -> None
Parameters
Name Type Description
writer StreamWriter
timeout float
wait_for_write 3 T ▼
Bound one response-side write operation by ``write_timeout``.
async
async def wait_for_write(operation: Awaitable[T], writer: StreamWriter, timeout: float) -> T
Parameters
Name Type Description
operation Awaitable[T]
writer StreamWriter
timeout float
Returns
T