|
perfc 0.12.0
|
Simple type that provide synchronized access by holding a lock to T container. More...
#include <register.hpp>
Public Types | |
| using | PointerType = std::add_pointer_t<T> |
| using | ReferenceType = std::add_lvalue_reference_t<T> |
Public Member Functions | |
| Locked (ReferenceType t, Mutex &mutex) | |
| Construct by providing reference to object requiring synchronized access and the mutex protecting it. | |
| Locked (Locked &&other) noexcept | |
| Move constructs by taking owneship of internal state of other. | |
| Locked & | operator= (Locked &&other) noexcept |
| Move constructs by taking owneship of internal state of other. | |
| PointerType | Get () const noexcept |
| ReferenceType | operator* () const noexcept |
| PointerType | operator-> () const noexcept |
| operator bool () const noexcept | |
| void | Unlock () noexcept |
| Unlocks lock. | |
Simple type that provide synchronized access by holding a lock to T container.
Accessing the locked object is peformed using pointer semantics.
Definition at line 58 of file register.hpp.
| using perfc::Locked< T, Mutex >::PointerType = std::add_pointer_t<T> |
Definition at line 60 of file register.hpp.
| using perfc::Locked< T, Mutex >::ReferenceType = std::add_lvalue_reference_t<T> |
Definition at line 61 of file register.hpp.
|
inline |
Construct by providing reference to object requiring synchronized access and the mutex protecting it.
| t | Object to obtain exclusive access to. |
| mutex | Mutex protecting t. |
| Exception | originating from Mutex::lock() (typically std::system_error) |
Definition at line 71 of file register.hpp.
|
inlinenoexcept |
Move constructs by taking owneship of internal state of other.
| other | Object to move from. |
Definition at line 78 of file register.hpp.
|
inlinenoexcept |
Definition at line 99 of file register.hpp.
|
inlinenoexcept |
Definition at line 118 of file register.hpp.
|
inlinenoexcept |
Definition at line 105 of file register.hpp.
|
inlinenoexcept |
Definition at line 111 of file register.hpp.
|
inlinenoexcept |
Move constructs by taking owneship of internal state of other.
| other | Object to move from. |
Definition at line 88 of file register.hpp.
|
inlinenoexcept |
Unlocks lock.
Get() == nullptr Definition at line 129 of file register.hpp.