Skip to main content

Crate aqueue

Crate aqueue 

Source
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:

TypePrimitiveBest for
Actor<I>Mutexserial / write-heavy workloads
RwModel<I>RwLockread-heavy workloads
PCModel<I>Semaphorebounded parallelism / rate limiting

The low-level queue primitives (AQueue, RwQueue, SemaphoreQueue) are also exported for custom use cases.

§Feature flags

FlagEffect
tokio_timeEnables [inner_wait!], [call_wait!], [call_mut_wait!] with tokio timeouts
async_std_timeSame 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 I through 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.
SemaphoreQueue
An async semaphore queue that limits the number of concurrently executing closures.