This class implements a scoped lock object for recursive lock objects.
More...
This class implements a scoped lock object for recursive lock objects.
The application of a scoped lock object ensures that a lock will be unlocked in any case if the scope (in which the object exists) ends.
Thus, possible dead locks can be avoided (e.g., if a function returns while the before the unlock() function of the Lock object is invoke or if an exception is thrown but not intercepted).
- See also
- Lock, TemplatedScopedLock, TemporaryScopedLock, OptionalScopedLock.
◆ ScopedLock() [1/2]
Ocean::ScopedLock::ScopedLock |
( |
Lock & |
lock | ) |
|
|
inlineexplicit |
Creates a new scoped lock object by a given lock object.
- Parameters
-
lock | The lock object used for locking |
◆ ~ScopedLock()
Ocean::ScopedLock::~ScopedLock |
( |
| ) |
|
|
inline |
Destructs a scoped lock and unlocks the internal lock object.
◆ ScopedLock() [2/2]
Ocean::ScopedLock::ScopedLock |
( |
const ScopedLock & |
object | ) |
|
|
protecteddelete |
Disabled accessible copy operator.
- Parameters
-
◆ operator=()
Disabled accessible assigns operator.
- Parameters
-
- Returns
- Reference to this object
◆ lock_
Lock& Ocean::ScopedLock::lock_ |
|
protected |
Lock object which is locked during the existence of this scoped lock object.
The documentation for this class was generated from the following file: