Refactors test cases
[libcds.git] / test / stress / misc / deque_driver.cpp
index 7d933ad..e7d7896 100644 (file)
@@ -31,7 +31,7 @@ protected:
   }
 
   static void StealerThread(int index) {
-    while (!terminate_stealer.load(memory_order_relaxed)) {
+    while (!terminate_stealer.load(memory_order_acquire)) {
       while (true) {
         int res = deque->steal();
         if (res != EMPTY && res != ABORT) {
@@ -97,7 +97,7 @@ TEST_F(ChaseLevDequeTest, DequePushPopTake) {
     MainThread(s_nDequeStealerThreadCount, i);
   }
 
-  terminate_stealer.store(1, memory_order_relaxed);
+  terminate_stealer.store(1, memory_order_release);
   for (ullong i = 0; i < s_nDequeStealerThreadCount; i++) {
     threads[i].join();
   }