From dfb75ae49d4d617ec02188a6f449e8b8015ad467 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 28 May 2020 09:42:26 +0300 Subject: refactor: Rename LockGuard to StdLockGuard for consistency with StdMutex --- src/threadsafety.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/threadsafety.h') 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 +// 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 { public: - explicit LockGuard(StdMutex& cs) EXCLUSIVE_LOCK_FUNCTION(cs) : std::lock_guard(cs) {} - ~LockGuard() UNLOCK_FUNCTION() {}; + explicit StdLockGuard(StdMutex& cs) EXCLUSIVE_LOCK_FUNCTION(cs) : std::lock_guard(cs) {} + ~StdLockGuard() UNLOCK_FUNCTION() {} }; #endif // BITCOIN_THREADSAFETY_H -- cgit v1.2.3