Remove/make private the default ***Holder constructor to allow compile time detection...
[folly.git] / folly / detail / ThreadLocalDetail.cpp
index 12a02e4..67eb056 100644 (file)
@@ -45,7 +45,7 @@ void StaticMetaBase::onThreadExit(void* ptr) {
   };
 
   {
-    SharedMutex::ReadHolder rlock;
+    SharedMutex::ReadHolder rlock(nullptr);
     if (meta.strict_) {
       rlock = SharedMutex::ReadHolder(meta.accessAllThreadsLock_);
     }
@@ -103,7 +103,7 @@ void StaticMetaBase::destroy(EntryID* ent) {
     std::vector<ElementWrapper> elements;
 
     {
-      SharedMutex::WriteHolder wlock;
+      SharedMutex::WriteHolder wlock(nullptr);
       if (meta.strict_) {
         /*
          * In strict mode, the logic guarantees per-thread instances are