9 #ifndef CPPCOMMON_THREADS_LOCKER_H
10 #define CPPCOMMON_THREADS_LOCKER_H
29 explicit Locker(T& primitive) : _primitive(primitive) { _primitive.Lock(); }
56 explicit ReadLocker(T& primitive) : _primitive(primitive) { _primitive.LockRead(); }
83 explicit WriteLocker(T& primitive) : _primitive(primitive) { _primitive.LockWrite(); }
Locker synchronization primitive.
Locker & operator=(const Locker &)=delete
Locker(const Locker &)=delete
Locker & operator=(Locker &&)=delete
Locker(T &primitive)
Default class constructor.
Read locker synchronization primitive.
ReadLocker & operator=(ReadLocker &&)=delete
ReadLocker(const ReadLocker &)=delete
ReadLocker(T &primitive)
Default class constructor.
ReadLocker & operator=(const ReadLocker &)=delete
ReadLocker(ReadLocker &&)=delete
Write locker synchronization primitive.
WriteLocker(const WriteLocker &)=delete
WriteLocker & operator=(WriteLocker &&)=delete
WriteLocker(WriteLocker &&)=delete
WriteLocker & operator=(const WriteLocker &)=delete
WriteLocker(T &primitive)
Default class constructor.
C++ Common project definitions.