![]() |
ATLAS Offline Software
|
A pointer together with a movable lock. More...
#include <LockedPointer.h>
Public Member Functions | |
LockedPointer (T &p, std::unique_lock< MUTEX > &&lock) | |
T * | get () |
T * | operator-> () |
T & | operator* () |
Private Attributes | |
std::unique_lock< MUTEX > | m_lock |
T & | m_p |
A pointer together with a movable lock.
This class holds a pointer to T along with a unique_lock. It can be used where we want to return a pointer to an object protected by a lock, and so want to return the lock along with the pointer.
Objects of this class may be moved but not copied (like unique_ptr).
Definition at line 34 of file LockedPointer.h.
|
inline |
Definition at line 37 of file LockedPointer.h.
|
inline |
Definition at line 43 of file LockedPointer.h.
|
inline |
Definition at line 45 of file LockedPointer.h.
|
inline |
Definition at line 44 of file LockedPointer.h.
|
private |
Definition at line 48 of file LockedPointer.h.
|
private |
Definition at line 49 of file LockedPointer.h.