carb::dictionary::ScopedWrite
Defined in carb/dictionary/IDictionary.h
-
class ScopedWrite
A helper class for calling writeLock() and unlock().
Similar to
std::unique_lock
.Public Functions
-
inline ScopedWrite(const IDictionary &dictionary, Item *item)
RAII constructor.
Immediately takes a write lock until *this is destroyed.
- Parameters
dictionary – A reference to IDictionary.
item – The item in the subtree to lock. The root of this item is found and the entire subtree from the root is locked.
-
inline ~ScopedWrite()
Destructor. Releases the write lock.
-
inline ScopedWrite(const IDictionary &dictionary, Item *item)