Bulkhead async
provide.foundation.resilience.bulkhead_async
¶
TODO: Add module docstring.
Classes¶
AsyncResourcePool
¶
Asynchronous resource pool with limited capacity for isolation.
Async-safe implementation using asyncio.Lock and asyncio.Event. For sync contexts, use SyncResourcePool instead.
Functions¶
__attrs_post_init__
¶
acquire
async
¶
Acquire a resource slot (async).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeout
|
float | None
|
Maximum time to wait (defaults to pool timeout) |
None
|
Returns:
| Type | Description |
|---|---|
bool
|
True if acquired, False if timeout |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If queue is full |
Source code in provide/foundation/resilience/bulkhead_async.py
active_count
async
¶
available_capacity
async
¶
get_stats
async
¶
Get pool statistics.
Source code in provide/foundation/resilience/bulkhead_async.py
queue_size
async
¶
release
async
¶
Release a resource slot.