Ocean
|
This class implements a template-based recursive lock object. More...
Additional Inherited Members | |
Public Member Functions inherited from Ocean::Lock | |
Lock () | |
Creates a new lock object. More... | |
~Lock () | |
Destructs a lock object. More... | |
void | lock () |
Locks the critical section. More... | |
void | unlock () |
Unlocks the critical section. More... | |
bool | isLocked () |
Returns whether this critical section is locked by another thread. More... | |
Protected Member Functions inherited from Ocean::Lock | |
Lock (const Lock &lock)=delete | |
Disabled copy constructor. More... | |
Lock & | operator= (const Lock &lock)=delete |
Disabled assign operator. More... | |
Protected Attributes inherited from Ocean::Lock | |
CRITICAL_SECTION | criticalSection_ |
Critical section object of windows. More... | |
pthread_mutex_t | mutex_ |
Pthread mutex object. More... | |
This class implements a template-based recursive lock object.
The class allows to e.g., implement classes which can be thread-safe or not based on a template parameter.
tActive | True, to activate the lock; False, to avoid using the lock at all |