|
Ocean
|
This class implements a template-based recursive lock object. More...
#include <Lock.h>
Public Member Functions | |
| TemplatedLock ()=default | |
| Creates a new lock object. | |
Public Member Functions inherited from Ocean::Lock | |
| Lock () | |
| Creates a new lock object. | |
| ~Lock () | |
| Destructs a lock object. | |
| void | lock () |
| Locks the critical section. | |
| void | unlock () |
| Unlocks the critical section. | |
| bool | isLocked () |
| Returns whether this critical section is locked by another thread. | |
Additional Inherited Members | |
Protected Member Functions inherited from Ocean::Lock | |
| Lock (const Lock &lock)=delete | |
| Disabled copy constructor. | |
| Lock & | operator= (const Lock &lock)=delete |
| Disabled assign operator. | |
Protected Attributes inherited from Ocean::Lock | |
| CRITICAL_SECTION | criticalSection_ |
| Critical section object of windows. | |
| pthread_mutex_t | mutex_ |
| Pthread mutex object. | |
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 |
|
default |
Creates a new lock object.