template<typename SettingsClass>
class makVrv::DtWriteSettingsLock< SettingsClass >
a write settings lock on a setting object.
The object can be read and modified, but no other threads can access the object.
- Warning
- Keep this lock as short as possible, it will freeze other threads.
-
DO NOT pass lock objects around.
-
DO NOT keep lock objects as members.
-
DO NOT store lock objects as pointers.
-
DO NOT use multiple lock objects at the same time.
Usage
{
DtWriteSettingsLock<DtTestSettings> readTest(mySharedSettingsManager);
bool value = readTest->getValue();
readTest->setValue(!value);
}