#include <userver/concurrent/mutex_set.hpp>
A dynamic set of mutexes.
It can be used for separate critical sections for multiple keys when the key set is not known at compile time and may change in runtime.
Example:
Definition at line 84 of file mutex_set.hpp.
Public Member Functions | |
MutexSet (size_t ways=1, size_t way_size=1, const Hash &hash=Hash{}, const Equal &equal=Equal{}) | |
ItemMutex< Key, Equal > | GetMutexForKey (Key key) |
|
explicit |
Definition at line 99 of file mutex_set.hpp.
ItemMutex< Key, Equal > concurrent::MutexSet< Key, Hash, Equal >::GetMutexForKey | ( | Key | key | ) |
Get the mutex-like object for a key. Coroutine-safe.
Definition at line 103 of file mutex_set.hpp.