moirai-sync
Synchronization primitives for the Moirai
concurrency library. The crate re-exports std::sync's Mutex, RwLock,
Condvar, and Barrier unchanged and adds only primitives whose behavior std
does not provide:
FutexMutex— adaptive spinning with futex-backed waiting on Linux.WaitGroup— Go-style completion counter.ConcurrentHashMap— segment-based locking, with poisoning surfaced as a typedSegmentPoisonederror rather than a panic.ShardedResourcePool— sharded pooling of reusable resources.LockFreeStack(re-exported frommoirai-core) andAtomicCounter(re-exported frommoirai-utils).
[]
= "0.5"
use ;
let mutex = new;
let wg = new;
wg.add;
wg.done;
wg.wait;
Full documentation: https://docs.rs/moirai-sync
License
Licensed under either of Apache-2.0 or MIT at your option.