Lines Matching defs:Locked
45 * Mutexed<DataToProtect>::Locked data(mProtectedData); // access the protected data
74 * Mutexed<DataToProtect>::Locked data(mProtectedData);
78 * void helper(const Mutexed<DataToProtect>::Locked &data) {
103 class Locked {
105 inline Locked(Mutexed<T> &mParent);
106 inline Locked(Locked &&from) :
110 inline ~Locked();
142 Locked(const Locked&) = delete;
143 void operator=(const Locked&) = delete;
152 // Lock the mutex, and create an accessor-guard (a Locked object) to access the underlying
155 // This is just a shorthand for Locked() constructor to avoid specifying the template type.
156 inline Locked lock() {
157 return Locked(*this);
161 friend class Locked;
171 inline Mutexed<T>::Locked::Locked(Mutexed<T> &mParent)
179 inline Mutexed<T>::Locked::~Locked() {
186 inline void Mutexed<T>::Locked::unlock() {
194 inline void Mutexed<T>::Locked::lock() {