saa-0.0.3 has been yanked.
Synchronous and Asynchronous Synchronization Primitives
WORK-IN-PROGRESS.
- THE CODE IS INCOMPLETE AND NOT AT ALL BATTLE-TESTED.
Low-level synchronization primitives that provide both synchronous and asynchronous interfaces.
Features
- Asynchronous counterparts of blocking and synchronous methods.
Loomsupport:features = ["loom"].- No spin-locks and no busy loops.
Lock
saa::Lock is a Low-level shared-exclusive lock that provides both synchronous and asynchronous interfaces. Synchronous locking methods such as lock_exclusive_sync or lock_shared_sync can be used with their asynchronous counterparts, lock_exclusive_async or lock_shared_async, at the same time. saa::Lock implements a heap-allocation-free fair wait queue that is shared among both synchronous and asynchronous methods.
Semaphore
saa::Semaphore is a synchronization primitive that allows a fixed number of threads to access a resource concurrently.