#include <userver/concurrent/variable.hpp>
Proxy class for locked access to data protected with locking::SharedLock<T>
Definition at line 18 of file variable.hpp.
Public Types | |
| using | Mutex = typename Lock::mutex_type |
Public Member Functions | |
| LockedPtr (Mutex &mutex, Data &data) | |
| LockedPtr (Lock &&lock, Data &data) | |
| Data & | operator* () &USERVER_IMPL_LIFETIME_BOUND |
| const Data & | operator* () const &USERVER_IMPL_LIFETIME_BOUND |
| Data & | operator* () && |
| Don't use *tmp for temporary value, store it to variable. | |
| Data * | operator-> () &USERVER_IMPL_LIFETIME_BOUND |
| const Data * | operator-> () const &USERVER_IMPL_LIFETIME_BOUND |
| Data * | operator-> () && |
| Don't use tmp-> for temporary value, store it to variable. | |
| Data & | GetUnsafeForStableSubobject () & |
| const Data & | GetUnsafeForStableSubobject () const & |
| Data & | GetUnsafeForStableSubobject () && |
| Don't use *tmp for temporary value, store it to variable. | |
| Lock & | GetLock () USERVER_IMPL_LIFETIME_BOUND |
| using concurrent::LockedPtr< Lock, Data >::Mutex = typename Lock::mutex_type |
Definition at line 20 of file variable.hpp.
|
inline |
Definition at line 22 of file variable.hpp.
|
inline |
Definition at line 26 of file variable.hpp.
|
inline |
Definition at line 51 of file variable.hpp.
|
inline |
For node-based containers, e.g. std::unordered_map, where container access needs to be locked, but after that the reference is stable and does not need the lock anymore.
Definition at line 45 of file variable.hpp.
|
inline |
Don't use *tmp for temporary value, store it to variable.
Definition at line 49 of file variable.hpp.
|
inline |
Definition at line 46 of file variable.hpp.
|
inline |
Don't use *tmp for temporary value, store it to variable.
Definition at line 35 of file variable.hpp.
|
inline |
Definition at line 31 of file variable.hpp.
|
inline |
Definition at line 32 of file variable.hpp.
|
inline |
Don't use tmp-> for temporary value, store it to variable.
Definition at line 41 of file variable.hpp.
|
inline |
Definition at line 37 of file variable.hpp.
|
inline |
Definition at line 38 of file variable.hpp.