ucommon
7.0.0
About: GNU uCommon C++ is a portable and optimized class framework for writing C++ applications that need to use threads and support concurrent synchronization, and that use sockets, XML parsing, object serialization, thread-optimized string and data structure classes, etc..
![]() ![]() |
#include <access.h>
Public Member Functions | |
Locking (ExclusiveProtocol *object) | |
~Locking () | |
bool | operator! () const |
operator bool () const | |
void | release (void) |
Private Member Functions | |
__DELETE_COPY (Locking) | |
Private Attributes | |
ExclusiveProtocol * | lock |
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.
ucommon::ExclusiveProtocol::Locking::Locking | ( | ExclusiveProtocol * | object | ) |
Create an instance of an exclusive object reference.
object | containing Exclusive base class protocol to lock. |
Definition at line 74 of file access.cpp.
References ucommon::ExclusiveProtocol::_lock().
ucommon::ExclusiveProtocol::Locking::~Locking | ( | ) |
Destroy reference to exclusively locked object, release lock.
Definition at line 92 of file access.cpp.
|
private |
|
inline |
|
inline |
void ucommon::ExclusiveProtocol::Locking::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.
Definition at line 111 of file access.cpp.
|
private |