]> git.sesse.net Git - stockfish/blobdiff - src/syzygy/tbprobe.cpp
Change lock type
[stockfish] / src / syzygy / tbprobe.cpp
index 97d848a22af4bf3e72079995c401e656bc1ac5da..36234786f126dd004b8cdc8b16f1f5a72246f9da 100644 (file)
@@ -1141,7 +1141,7 @@ void* mapped(TBTable<Type>& e, const Position& pos) {
     if (e.ready.load(std::memory_order_acquire))
         return e.baseAddress; // Could be nullptr if file does not exist
 
-    std::unique_lock<std::mutex> lk(mutex);
+    std::scoped_lock<std::mutex> lk(mutex);
 
     if (e.ready.load(std::memory_order_relaxed)) // Recheck under lock
         return e.baseAddress;