Expand description
-
ⓘ
let val = ICoW::new(TestStruct::new(1, 2)); // read only let read1 = val.read(); //.. drop(read1); // ... // copy on write NON-exclusively, read is possible let mut transaction = val.clone(); transaction.start = 5; transaction.stop = 6; // update, after calling this function, all reades who // read before will still see old version. // all reades after, new transaction.commit(); //or drop(transaction); // to drop changes // exclusive lock, read is also not possible let res = val.clone_exclusivly(); // .. // commit changes releasing lock commit(val); //or drop(val); // to drop changes and release lock
Re-exports§
pub use cow_mutex::ICoW;pub use cow_mutex::ICoWRead;pub use cow_mutex::ICoWCopy;pub use cow_mutex::ICoWLock;
Modules§
- cow_
mutex - A RwLock based copy-on-write.
Enums§
- ICoW
Error - Errors which may be returned.
- ICoW
Lock Types - Type of the sync code.