This class implements a recursive scoped lock object allowing to release the lock before the scoped object itself is released.
More...
|
Lock * | lock_ = nullptr |
| Lock object which is locked during the existence of this scoped lock object. More...
|
|
This class implements a recursive scoped lock object allowing to release the lock before the scoped object itself is released.
- See also
- Lock, ScopedLock, TemplatedScopedLock, OptionalScopedLock.
◆ TemporaryScopedLock() [1/3]
Ocean::TemporaryScopedLock::TemporaryScopedLock |
( |
| ) |
|
|
default |
Creates a new scoped lock object which is not locked yet.
◆ TemporaryScopedLock() [2/3]
Ocean::TemporaryScopedLock::TemporaryScopedLock |
( |
Lock & |
lock | ) |
|
|
inlineexplicit |
Creates a new scoped lock object by a given lock object.
- Parameters
-
lock | The lock object used for locking |
◆ ~TemporaryScopedLock()
Ocean::TemporaryScopedLock::~TemporaryScopedLock |
( |
| ) |
|
|
inline |
Destructs a scoped lock and unlocks the internal lock object (if still locked).
◆ TemporaryScopedLock() [3/3]
Disabled accessible copy operator.
- Parameters
-
◆ isReleased()
bool Ocean::TemporaryScopedLock::isReleased |
( |
| ) |
const |
|
inline |
Returns whether this scoped lock is released already.
- Returns
- True, if so
◆ lock()
Lock * Ocean::TemporaryScopedLock::lock |
( |
| ) |
const |
|
inline |
Returns the lock object which (if existing) is locked during the existence of this scoped lock object.
- Returns
- The associated lock object, nullptr if this object is already released (or was never locked)
◆ operator=()
Disabled accessible assigns operator.
- Parameters
-
- Returns
- Reference to this object
◆ release()
void Ocean::TemporaryScopedLock::release |
( |
| ) |
|
|
inline |
Explicitly releases the lock before the scoped lock object is released.
◆ relock()
void Ocean::TemporaryScopedLock::relock |
( |
Lock & |
lock | ) |
|
|
inline |
Re-locks this scoped lock with a given lock.
This scoped lock must be released before re-locking it again.
- Parameters
-
lock | The lock to be used for locking |
- See also
- isReleased().
◆ lock_
Lock* Ocean::TemporaryScopedLock::lock_ = nullptr |
|
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: