Expand description
A RwLock based copy-on-write.
Structsยง
- ICoW
- A main structure which implements CoW approach based on RwLock. The object
stored inside can be read directly, but modifying the
innervalue is performed usingCoWcopy-on-write approach. - ICoW
Copy - A write-guard which holds new value to which the new data is written. And previous value too. This type of guard is not exclusive, so multiple CoW operations may be performed in parallel which is not normally needed.
- ICoW
Internal - ICoW
Lock - A write-guard which holds new value to which the new values are written. And previous value too. This type of guard is exclusive, so multiple CoW operations CANNOT be performed in parallel which is good for instance update without racing. The readers are also waiting until the changes are commited.
- ICoW
Read - A read only guard. Implements Deref only. The guarded value is valid
all the time, even if the inner value was updated. The updated value
will not be visible in the current instance until
re-readis performed. - ICoW
Weak - A independent from the ICoW instance, which is not binded to the lifetime
of the main instance. The value contains a read-only weak reference to
ITEM. If the weak reference become invalid, then a new copy will be obtained. - ICoW
Weak Read - An instance emmited by the ICoWWeak::aquire which allows to read the item for
a
'weakperiod of time.