ATLAS Offline Software
|
Lock object for taking out upgradable locks. More...
#include <threading.h>
Public Types | |
typedef LOCKABLE | lockable_type |
The underlying object type. More... | |
Public Member Functions | |
upgrading_lock (lockable_type &obj) | |
Take out an upgrade lock on obj and remember it. More... | |
~upgrading_lock () | |
Release the held lock. More... | |
void | upgrade () |
Convert the lock from upgrade to exclusive. More... | |
Private Member Functions | |
upgrading_lock () | |
upgrading_lock (upgrading_lock const &) | |
upgrading_lock & | operator= (upgrading_lock const &) |
Private Attributes | |
lockable_type & | m_obj |
The lock being held. More... | |
bool | m_exclusive |
Has the lock been converted to exclusive? More... | |
Lock object for taking out upgradable locks.
The will first be taken out in upgrade mode. If upgrade()
is called, then the lock will be upgraded to exclusive mode. When this object is destroyed, the object will be unlocked for either upgrade or exclusive mode, as appropriate.
Definition at line 228 of file threading.h.
typedef LOCKABLE AthContainers_detail::upgrading_lock< LOCKABLE >::lockable_type |
The underlying object type.
Definition at line 232 of file threading.h.
|
explicit |
Take out an upgrade lock on obj
and remember it.
obj | The lockable object. |
AthContainers_detail::upgrading_lock< LOCKABLE >::~upgrading_lock | ( | ) |
Release the held lock.
|
private |
|
private |
|
private |
void AthContainers_detail::upgrading_lock< LOCKABLE >::upgrade | ( | ) |
Convert the lock from upgrade to exclusive.
|
private |
Has the lock been converted to exclusive?
Definition at line 266 of file threading.h.
|
private |
The lock being held.
Definition at line 263 of file threading.h.