|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
RAII guard for exclusive (write) access. More...
#include <concurrency_utils.H>
Public Member Functions | |
| WriteLockedPtr (SharedMutex &mutex, T &value) | |
| Construct a guard and acquire an exclusive 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< SharedMutex > | lock_ |
| T * | ptr_ |
RAII guard for exclusive (write) access.
Definition at line 945 of file concurrency_utils.H.
|
inline |
Construct a guard and acquire an exclusive lock.
| mutex | Shared mutex protecting the value. |
| value | Protected object to expose through the guard. |
| Any | exception thrown while locking mutex. |
Definition at line 956 of file concurrency_utils.H.
|
inlinenoexcept |
Access the protected value.
| Nothing. |
Definition at line 963 of file concurrency_utils.H.
References Aleph::RwSynchronized< T, SharedMutex >::WriteLockedPtr::ptr_.
|
inlinenoexcept |
Access the protected value.
| Nothing. |
Definition at line 973 of file concurrency_utils.H.
References Aleph::RwSynchronized< T, SharedMutex >::WriteLockedPtr::ptr_.
|
inlinenoexcept |
Access members of the protected value.
| Nothing. |
Definition at line 968 of file concurrency_utils.H.
References Aleph::RwSynchronized< T, SharedMutex >::WriteLockedPtr::ptr_.
|
private |
Definition at line 947 of file concurrency_utils.H.
|
private |