#include <userver/concurrent/mutex_set.hpp>
Mutex-like object associated with the key of a MutexSet. It provides the same interface as engine::Mutex, you may use it with std::unique_lock, std::lock_guard, etc.
Definition at line 50 of file mutex_set.hpp.
Public Types | |
using | HashAndKey = utils::CachedHash<Key> |
using | MutexDatum |
Public Member Functions | |
ItemMutex (MutexDatum &md, HashAndKey &&key) | |
void | lock () |
void | unlock () |
bool | try_lock () |
template<typename Rep , typename Period > | |
bool | try_lock_for (std::chrono::duration< Rep, Period >) |
template<typename Clock , typename Duration > | |
bool | try_lock_until (std::chrono::time_point< Clock, Duration >) |
using concurrent::ItemMutex< Key, Equal >::HashAndKey = utils::CachedHash<Key> |
Definition at line 52 of file mutex_set.hpp.
using concurrent::ItemMutex< Key, Equal >::MutexDatum |
Definition at line 54 of file mutex_set.hpp.
concurrent::ItemMutex< Key, Equal >::ItemMutex | ( | MutexDatum & | md, |
HashAndKey && | key ) |
Definition at line 124 of file mutex_set.hpp.
void concurrent::ItemMutex< Key, Equal >::lock | ( | ) |
Definition at line 128 of file mutex_set.hpp.
bool concurrent::ItemMutex< Key, Equal >::try_lock | ( | ) |
Definition at line 162 of file mutex_set.hpp.
bool concurrent::ItemMutex< Key, Equal >::try_lock_for | ( | std::chrono::duration< Rep, Period > | duration | ) |
Definition at line 169 of file mutex_set.hpp.
bool concurrent::ItemMutex< Key, Equal >::try_lock_until | ( | std::chrono::time_point< Clock, Duration > | time_point | ) |
Definition at line 177 of file mutex_set.hpp.
void concurrent::ItemMutex< Key, Equal >::unlock | ( | ) |
Definition at line 138 of file mutex_set.hpp.