carb::dictionary::ScopedRead
Defined in carb/dictionary/IDictionary.h
-
class ScopedRead
A helper class for calling readLock() and unlock().
Similar to
std::shared_lock
.Public Functions
-
inline ScopedRead(const IDictionary &dictionary, const Item *item)
RAII constructor.
Immediately takes a read 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 ~ScopedRead()
Destructor. Releases the read lock.
-
inline ScopedRead(const IDictionary &dictionary, const Item *item)