commonlib
locking.h
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #include <mutex>
13 #include "synchronization.h"
14 
15 BEGIN_NAMESPACE_SYNCHRONIZATION
16 
21 template <class TMutexType>
22 class Locking
23 {
24 public:
29  TMutexType& getLock()
30  {
31  return lock;
32  }
33 
34 protected:
35  mutable TMutexType lock;
36 };
37 
41 class RecursiveLocking : public Locking<std::recursive_mutex>
42 {
43 };
44 
45 END_NAMESPACE_SYNCHRONIZATION
Abstract class bringing basic locking features on synchronization and threading related classes...
Definition: locking.h:22
TMutexType & getLock()
Get locking object.
Definition: locking.h:29
Abstract class bringing basic recursive locking.
Definition: locking.h:41