Expand description
Bulkhead — semaphore-backed concurrency cap.
Wraps tokio::sync::Semaphore. Useful for isolating a downstream resource
(“at most N in-flight calls to this database”) so one runaway caller can’t
starve the rest of the system.
Holding a BulkheadPermit keeps a slot reserved; dropping it releases.
Structs§
- Bulkhead
- A concurrency cap.
- Bulkhead
Permit - Active permit. Dropping it releases the slot.