fix memory order in AtomicHashMap<>::findInternal()
[folly.git] / folly / AtomicHashMap-inl.h
index f2738649c8c62b04d9f9640778df00f61e9805ca..01919f24032c528f20db83d10020223d0dc342e0 100644 (file)
@@ -163,7 +163,7 @@ findInternal(const KeyT k) const {
   int const numMaps = numMapsAllocated_.load(std::memory_order_acquire);
   FOR_EACH_RANGE(i, 1, numMaps) {
     // Check each map successively.  If one succeeds, we're done!
-    SubMap* thisMap = subMaps_[i].load(std::memory_order_release);
+    SubMap* thisMap = subMaps_[i].load(std::memory_order_relaxed);
     ret = thisMap->findInternal(k);
     if (LIKELY(ret.idx != thisMap->capacity_)) {
       return SimpleRetT(i, ret.idx, ret.success);