Skip to main content

Module sync

Module sync 

Source
Expand description

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

Re-exports§

pub use self::concurrent_hash_map::ConcurrentHashMap;
pub use self::concurrent_hash_map::SegmentPoisoned;
pub use self::futex_mutex::FutexMutex;
pub use self::futex_mutex::FutexMutexGuard;
pub use self::resource_pool::ShardedResourcePool;
pub use self::resource_pool::SizeBounded;
pub use self::spin_lock::SpinLock;
pub use self::spin_lock::SpinLockGuard;
pub use self::wait_group::WaitGroup;

Modules§

concurrent_hash_map
Sharded concurrent hash map with per-segment locking.
futex_mutex
Futex-backed mutex with OS-assisted parking for fair, contended sections. Mutex backed by a Linux futex, with a condvar fallback elsewhere.
resource_pool
Sharded pool handing out reusable resources without a global lock.
spin_lock
Spin lock for critical sections short enough that parking costs more than spinning.
wait_group
Barrier that releases once a counted set of tasks has completed.