A kind of smart pointer object to support exclusive locking protocol.
More...
#include <access.h>
A kind of smart pointer object to support exclusive locking protocol.
This object initiates an exclusive lock for the object being referenced when it is instantiated, and releases the exclusive lock when it is destroyed. You would pass the pointer an object that has the Exclusive as a base class.
- Author
- David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Definition at line 138 of file access.h.
Create an instance of an exclusive object reference.
- Parameters
-
object | containing Exclusive base class protocol to lock. |
ucommon::exclusive_access::operator bool |
( |
| ) |
const |
|
inline |
Test if the reference holds an active lock.
- Returns
- true if locking an object.
Definition at line 166 of file access.h.
bool ucommon::exclusive_access::operator! |
( |
| ) |
const |
|
inline |
Test if the reference holds an active lock.
- Returns
- true if is not locking an object.
Definition at line 159 of file access.h.
void ucommon::exclusive_access::release |
( |
void |
| ) |
|
Release a held lock programmatically.
This can be used to de-reference the object being exclusively locked without having to wait for the destructor to be called when the exclusive_lock falls out of scope.
The documentation for this class was generated from the following file: