|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
RAII guard for shared (read-only) access. More...
#include <concurrency_utils.H>
Public Member Functions | |
| ReadLockedPtr (SharedMutex &mutex, const T &value) | |
| Construct a guard and acquire a shared 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::shared_lock< SharedMutex > | lock_ |
| const T * | ptr_ |
RAII guard for shared (read-only) access.
Definition at line 911 of file concurrency_utils.H.
|
inline |
Construct a guard and acquire a shared lock.
| mutex | Shared mutex protecting the value. |
| value | Protected object to expose through the guard. |
| Any | exception thrown while locking mutex. |
Definition at line 922 of file concurrency_utils.H.
|
inlinenoexcept |
Access the protected value.
| Nothing. |
Definition at line 929 of file concurrency_utils.H.
References Aleph::RwSynchronized< T, SharedMutex >::ReadLockedPtr::ptr_.
|
inlinenoexcept |
Access the protected value.
| Nothing. |
Definition at line 939 of file concurrency_utils.H.
References Aleph::RwSynchronized< T, SharedMutex >::ReadLockedPtr::ptr_.
|
inlinenoexcept |
Access members of the protected value.
| Nothing. |
Definition at line 934 of file concurrency_utils.H.
References Aleph::RwSynchronized< T, SharedMutex >::ReadLockedPtr::ptr_.
|
private |
Definition at line 913 of file concurrency_utils.H.
|
private |