1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
//! Concread - Concurrently Readable Datastructures //! //! Concurrently readable is often referred to as Copy-On-Write, Multi-Version-Concurrency-Control. //! //! These structures allow multiple readers with transactions //! to proceed while single writers can operate. A reader is guaranteed the content //! will remain the same for the duration of the read, and readers do not block writers. //! Writers are serialised, just like a mutex. //! //! You can use these in place of a RwLock, and will likely see improvements in //! parallel throughput. //! //! The best use is in place of mutex/rwlock, where the reader exists for a //! non-trivial amount of time. //! //! For example, if you have a RwLock where the lock is taken, data changed or read, and dropped //! immediately, this probably won't help you. //! //! However, if you have a RwLock where you hold the read lock for any amount of time, //! writers will begin to stall - or inversely, the writer will cause readers to block //! and wait as the writer proceeds. //! //! In the future, a concurrent BTree and HashTree will be added, that can be used inplace //! of a `RwLock<BTreeMap>` or `RwLock<HashMap>`. Stay tuned! // #![deny(warnings)] #![warn(unused_extern_crates)] #![warn(missing_docs)] extern crate crossbeam_epoch; extern crate parking_lot; extern crate smallvec; #[cfg(test)] extern crate rand; pub mod cache; pub mod collections; pub mod cowcell; pub mod ebrcell; #[cfg(test)] extern crate crossbeam_utils; #[cfg(test)] mod lincowcell; pub use cowcell::CowCell; pub use ebrcell::EbrCell;