Skip to main content

Crate moirai_sync

Crate moirai_sync 

Source
Expand description

High-performance synchronization primitives for Moirai concurrency library.

This module provides specialized synchronization primitives that add value beyond the standard library, following YAGNI and DRY principles.

Re-exports§

pub use self::sync::ConcurrentHashMap;
pub use self::sync::FutexMutex;
pub use self::sync::FutexMutexGuard;
pub use self::sync::SegmentPoisoned;
pub use self::sync::ShardedResourcePool;
pub use self::sync::SizeBounded;
pub use self::sync::SpinLock;
pub use self::sync::SpinLockGuard;
pub use self::sync::WaitGroup;

Modules§

sync
Synchronization primitives: sharded maps and pools, spin locks, futex-backed mutexes, and completion barriers.

Structs§

AtomicCounter
A thread-safe atomic counter with increment and decrement operations.
Barrier
A barrier enables multiple threads to synchronize the beginning of some computation.
Condvar
A Condition Variable
LockFreeStack
Lock-free stack for object pooling.
Mutex
A mutual exclusion primitive useful for protecting shared data
MutexGuard
An RAII implementation of a “scoped lock” of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked.
RwLock
A reader-writer lock
RwLockReadGuard
RAII structure used to release the shared read access of a lock when dropped.
RwLockWriteGuard
RAII structure used to release the exclusive write access of a lock when dropped.