diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-05-28 09:42:26 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-05-28 09:54:24 +0300 |
commit | dfb75ae49d4d617ec02188a6f449e8b8015ad467 (patch) | |
tree | f891be07f0a9a617fc086317e24b32fe03b1b13b /src/threadsafety.h | |
parent | 79be4874209f71ba6428a80c40c9f028ac936c41 (diff) |
refactor: Rename LockGuard to StdLockGuard for consistency with StdMutex
Diffstat (limited to 'src/threadsafety.h')
-rw-r--r-- | src/threadsafety.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/threadsafety.h b/src/threadsafety.h index 404ecafebb..942aa3fdcd 100644 --- a/src/threadsafety.h +++ b/src/threadsafety.h @@ -62,13 +62,13 @@ class LOCKABLE StdMutex : public std::mutex { }; -// LockGuard provides an annotated version of lock_guard for us -// should only be used when sync.h Mutex/LOCK/etc aren't usable -class SCOPED_LOCKABLE LockGuard : public std::lock_guard<StdMutex> +// StdLockGuard provides an annotated version of std::lock_guard for us, +// and should only be used when sync.h Mutex/LOCK/etc are not usable. +class SCOPED_LOCKABLE StdLockGuard : public std::lock_guard<StdMutex> { public: - explicit LockGuard(StdMutex& cs) EXCLUSIVE_LOCK_FUNCTION(cs) : std::lock_guard<StdMutex>(cs) {} - ~LockGuard() UNLOCK_FUNCTION() {}; + explicit StdLockGuard(StdMutex& cs) EXCLUSIVE_LOCK_FUNCTION(cs) : std::lock_guard<StdMutex>(cs) {} + ~StdLockGuard() UNLOCK_FUNCTION() {} }; #endif // BITCOIN_THREADSAFETY_H |