#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 90 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 106 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 112 of file mutex_set.hpp.