# _timeouts

URL: /pounce/api/_timeouts/
Section: api
Description: Shared request-input and response-output timeout helpers.

---

> For a complete page index, fetch /pounce/llms.txt.

Open LLM text
(/pounce/api/_timeouts/index.txt)

Share with AI

Ask Claude
(https://claude.ai/new?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpounce%2Fapi%2F_timeouts%2Findex.txt)

Ask ChatGPT
(https://chatgpt.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpounce%2Fapi%2F_timeouts%2Findex.txt)

Ask Gemini
(https://gemini.google.com/app?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpounce%2Fapi%2F_timeouts%2Findex.txt)

Ask Copilot
(https://copilot.microsoft.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpounce%2Fapi%2F_timeouts%2Findex.txt)

Module

#
`_timeouts`

Shared request-input and response-output timeout helpers.

3Functions

## 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`
