mirror of
https://github.com/Zygo/bees.git
synced 2025-06-15 17:26:15 +02:00
multilock: allow turning it off
Add a master switch to turn off the entire MultiLock infrastructure for testing, without having to remove and add all the individual entry points. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
@ -14,6 +14,7 @@ namespace crucible {
|
||||
mutex m_mutex;
|
||||
condition_variable m_cv;
|
||||
map<string, size_t> m_counters;
|
||||
bool m_do_locking = true;
|
||||
|
||||
class LockHandle {
|
||||
const string m_type;
|
||||
@ -33,6 +34,7 @@ namespace crucible {
|
||||
shared_ptr<LockHandle> get_lock_private(const string &type);
|
||||
public:
|
||||
static shared_ptr<LockHandle> get_lock(const string &type);
|
||||
static void enable_locking(bool enabled);
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user