Expand description
Backpressure handling for write operations.
This module provides backpressure management to prevent memory exhaustion when the write side is slower than the producer side. It tracks pending frames and provides mechanisms to limit the number of in-flight writes.
§Usage
The BackpressureController is used internally by the writer task to
track pending writes. Handlers interact with backpressure through the
WriterHandle which will automatically
wait or reject when backpressure is active.
§Configuration
max_pending: Maximum number of pending frames (default: 1024)- Timeout: How long to wait when backpressure is active (default: 5s)
Structs§
- Backpressure
Controller - Backpressure controller for managing write queue pressure.
- Backpressure
Guard - Guard that automatically releases a backpressure slot on drop.
Constants§
- DEFAULT_
MAX_ PENDING - Default maximum pending frames before backpressure kicks in.
- DEFAULT_
TIMEOUT - Default backpressure timeout (how long to wait for space to become available).