Lock object for taking out upgradable locks. More...
#include <threading.h>
Public Types | |
typedef LOCKABLE | lockable_type |
The underlying object type. | |
Public Member Functions | |
upgrading_lock (lockable_type &obj) | |
Take out an upgrade lock on obj and remember it. | |
~upgrading_lock () | |
Release the held lock. | |
void | upgrade () |
Convert the lock from upgrade to exclusive. |
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.
AthContainers_detail::upgrading_lock< LOCKABLE >::upgrading_lock | ( | lockable_type & | obj | ) | [inline, explicit] |
Take out an upgrade lock on obj
and remember it.
obj | The lockable object. |