|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
RAII guard for read-only access to the synchronized value. More...
#include <concurrency_utils.H>
Public Member Functions | |
| ConstLockedPtr (Mutex &mutex, const T &value) | |
| Construct a guard and acquire the lock. | |
| const T & | get () const noexcept |
| Access the protected value. | |
| const T * | operator-> () const noexcept |
| Access members of the protected value. | |
| const T & | operator* () const noexcept |
| Access the protected value. | |
Private Attributes | |
| std::unique_lock< Mutex > | lock_ |
| const T * | ptr_ |
RAII guard for read-only access to the synchronized value.
Definition at line 747 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 758 of file concurrency_utils.H.
|
inlinenoexcept |
Access the protected value.
| Nothing. |
Definition at line 765 of file concurrency_utils.H.
References Aleph::Synchronized< T, Mutex >::ConstLockedPtr::ptr_.
|
inlinenoexcept |
Access the protected value.
| Nothing. |
Definition at line 775 of file concurrency_utils.H.
References Aleph::Synchronized< T, Mutex >::ConstLockedPtr::ptr_.
|
inlinenoexcept |
Access members of the protected value.
| Nothing. |
Definition at line 770 of file concurrency_utils.H.
References Aleph::Synchronized< T, Mutex >::ConstLockedPtr::ptr_.
|
private |
Definition at line 749 of file concurrency_utils.H.
|
private |
Definition at line 750 of file concurrency_utils.H.
Referenced by Aleph::Synchronized< T, Mutex >::ConstLockedPtr::get(), Aleph::Synchronized< T, Mutex >::ConstLockedPtr::operator*(), and Aleph::Synchronized< T, Mutex >::ConstLockedPtr::operator->().