Crate egglog_concurrency

Crate egglog_concurrency 

Source
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
ConcurrentVec
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.
MutexReader
A handle granting read access to the data guarded by a ReadOptimizedLock.
MutexWriter
A handle granting exclusive access to the data guarded by a ReadOptimizedLock.
Notification
A simple concurrent notification object, based on absl::Notificiation from the absl library. Notifications happen at most once (with future notifications being no-ops). Waiting threads can block, optionally with a timeout.
ReadOptimizedLock
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.
ResettableOnceLock
ResettableOnceLock provides thread-safe access to a value of type T via a specific state machine.