Expand description
§aqueue — Fast, Thread-Safe Async Execution Queue
aqueue provides three concurrency models for protecting shared state in
async Rust code, each backed by a different locking primitive:
| Type | Primitive | Best for |
|---|---|---|
Actor<I> | Mutex | serial / write-heavy workloads |
RwModel<I> | RwLock | read-heavy workloads |
PCModel<I> | Semaphore | bounded parallelism / rate limiting |
The low-level queue primitives (AQueue, RwQueue, SemaphoreQueue)
are also exported for custom use cases.
§Feature flags
| Flag | Effect |
|---|---|
tokio_time | Enables [inner_wait!], [call_wait!], [call_mut_wait!] with tokio timeouts |
async_std_time | Same macros backed by async-std timeouts |
Structs§
- AQueue
- A lightweight async mutex queue.
- Actor
- A thread-safe actor that serialises all access to an inner value
Ithrough an async mutex queue. - PCModel
- A thread-safe model that limits the number of concurrently executing async operations using a semaphore.
- RwModel
- A thread-safe model that allows concurrent reads and exclusive writes, backed by an async reader-writer lock queue.
- RwQueue
- An async reader-writer lock queue.
- Semaphore
Queue - An async semaphore queue that limits the number of concurrently executing closures.