From b71d52375e41a084e661d0f55f044ca8982312a4 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Thu, 13 Jun 2024 08:53:01 +0200 Subject: Make sure we monitor for new project, oplogs, namespaces and buckets during GCv2 (#93) - Bugfix: Make sure we monitor and include new project/oplogs created during GCv2 - Bugfix: Make sure we monitor and include new namespaces/cache buckets created during GCv2 --- src/zencore/include/zencore/thread.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/zencore/include') diff --git a/src/zencore/include/zencore/thread.h b/src/zencore/include/zencore/thread.h index bae630db9..9362802a1 100644 --- a/src/zencore/include/zencore/thread.h +++ b/src/zencore/include/zencore/thread.h @@ -35,6 +35,16 @@ public: struct SharedLockScope { + SharedLockScope(const SharedLockScope& Rhs) = delete; + SharedLockScope(SharedLockScope&& Rhs) : m_Lock(Rhs.m_Lock) { Rhs.m_Lock = nullptr; } + SharedLockScope& operator=(SharedLockScope&& Rhs) + { + ReleaseNow(); + m_Lock = Rhs.m_Lock; + Rhs.m_Lock = nullptr; + return *this; + } + SharedLockScope& operator=(const SharedLockScope& Rhs) = delete; SharedLockScope(RwLock& Lock) : m_Lock(&Lock) { Lock.AcquireShared(); } ~SharedLockScope() { ReleaseNow(); } -- cgit v1.2.3