Refactors parallel barrier test
[libcds.git] / test / stress / misc / barrier_driver.cpp
index 8dfc41d..272e3c4 100644 (file)
@@ -48,8 +48,8 @@ TEST_F(BarrierTest, Wait) {
     threads.push_back(std::thread(Thread));
   }
 
     threads.push_back(std::thread(Thread));
   }
 
-  for (size_t i = 0; i < s_nBarrierThreadCount; i++) {
-    threads[i].join();
+  for (auto& thrd : threads) {
+    thrd.join();
   }
   EXPECT_EQ(count, s_nBarrierPassCount);
   delete barrier;
   }
   EXPECT_EQ(count, s_nBarrierPassCount);
   delete barrier;