|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
RAII guard for exclusive access to the synchronized value. More...
#include <concurrency_utils.H>
Public Member Functions | |
| LockedPtr (Mutex &mutex, T &value) | |
| Construct a guard and acquire the lock. | |
| T & | get () noexcept |
| Access the protected value. | |
| T * | operator-> () noexcept |
| Access members of the protected value. | |
| T & | operator* () noexcept |
| Access the protected value. | |
Private Attributes | |
| std::unique_lock< Mutex > | lock_ |
| T * | ptr_ |
RAII guard for exclusive access to the synchronized value.
Definition at line 712 of file concurrency_utils.H.
|
inline |
Construct a guard and acquire the lock.
| mutex | Mutex protecting the value. |
| value | Protected object to expose through the guard. |
| Any | exception thrown while locking mutex. |
Definition at line 723 of file concurrency_utils.H.
|
inlinenoexcept |
Access the protected value.
| Nothing. |
Definition at line 730 of file concurrency_utils.H.
References Aleph::Synchronized< T, Mutex >::LockedPtr::ptr_.
|
inlinenoexcept |
Access the protected value.
| Nothing. |
Definition at line 740 of file concurrency_utils.H.
References Aleph::Synchronized< T, Mutex >::LockedPtr::ptr_.
|
inlinenoexcept |
Access members of the protected value.
| Nothing. |
Definition at line 735 of file concurrency_utils.H.
References Aleph::Synchronized< T, Mutex >::LockedPtr::ptr_.
|
private |
Definition at line 714 of file concurrency_utils.H.
|
private |
Definition at line 715 of file concurrency_utils.H.
Referenced by Aleph::Synchronized< T, Mutex >::LockedPtr::get(), Aleph::Synchronized< T, Mutex >::LockedPtr::operator*(), and Aleph::Synchronized< T, Mutex >::LockedPtr::operator->().