moirai_sync/lib.rs
1//! High-performance synchronization primitives for Moirai concurrency library.
2//!
3//! This module provides specialized synchronization primitives that add value
4//! beyond the standard library, following YAGNI and DRY principles.
5
6#![allow(clippy::new_without_default)]
7#![allow(clippy::manual_hash_one)]
8
9pub mod sync;
10
11// Re-export the canonical AtomicCounter from moirai-utils (SSOT)
12pub use moirai_utils::AtomicCounter;
13
14// Re-export standard library primitives directly (DRY principle)
15pub use std::sync::{
16 Barrier, Condvar, Mutex, MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard,
17};
18
19// Re-export LockFreeStack from moirai-core to maintain DRY principle
20pub use moirai_core::pool::LockFreeStack;
21
22// Re-export sync submodule items directly at crate root
23pub use self::sync::{
24 ConcurrentHashMap, FutexMutex, FutexMutexGuard, SegmentPoisoned, ShardedResourcePool,
25 SizeBounded, SpinLock, SpinLockGuard, WaitGroup,
26};