Expand description
Backpressure and flow control utilities.
This module provides utilities for managing data flow between producers and consumers with backpressure.
§Overview
The Backpressure controller provides two complementary mechanisms:
-
Buffer size tracking: Track how much data is buffered and block when full. Use
try_acquire,acquire, andreleasefor this. -
Concurrent operation limiting: Limit the number of concurrent operations using semaphore-based permits. Use
try_acquire_permitandacquire_permitfor this.
Structs§
- Backpressure
- A backpressure controller for limiting data flow and concurrent operations.
- Rate
Limiter - A rate limiter for controlling operation frequency.
- Token
Bucket - A token bucket for rate limiting with bursts.