Expand description
Handy routines for managing concurrency.
Re-exports§
pub use parallel_writer::ParallelVecWriter;
Modules§
- parallel_
writer - A Utility Struct for Writing to a Vector in parallel without blocking reads.
Structs§
- BitSet
- Concurrent
Vec - A simple concurrent vector type supporting push operations that do not block reads. Concurrent pushes are serialized, but reads need not wait for writes to complete, except when the vector needs to be resized.
- Mutex
Reader - A handle granting read access to the data guarded by a
ReadOptimizedLock. - Mutex
Writer - A handle granting exclusive access to the data guarded by a
ReadOptimizedLock. - Notification
- A simple concurrent notification object, based on
absl::Notificiationfrom the absl library. Notifications happen at most once (with future notifications being no-ops). Waiting threads can block, optionally with a timeout. - Read
Optimized Lock - A mutex lock optimized for low-contention read access. The RwLock type in the standard library allows multiple readers to make progress concurrently, but scalability is limited if these read-only critical sections are small because acquiring a read-side lock still requires a read-modify-write atomic operation.
- Resettable
Once Lock ResettableOnceLockprovides thread-safe access to a value of typeTvia a specific state machine.