Consistency in namespace-closing comments
[folly.git] / folly / experimental / flat_combining / test / FlatCombiningTestHelpers.h
index f9b4980d440f8f5a53dfce7fd1d42a40db2448c3..81007de7e6b4f349f6136a412cea44cc8ee1da34 100644 (file)
@@ -104,7 +104,21 @@ uint64_t fc_test(
       }
 
       if (excl) {
-        // test of unstructured exclusive access
+        // test of exclusive access through a lock holder
+        {
+          std::unique_lock<Mutex> l;
+          ex.holdLock(l);
+          CHECK(!mutex);
+          mutex = true;
+          VLOG(2) << tid << " " << ex.getVal() << " ...........";
+          using namespace std::chrono_literals;
+          /* sleep override */ // for coverage
+          std::this_thread::sleep_for(10ms);
+          VLOG(2) << tid << " " << ex.getVal() << " ===========";
+          CHECK(mutex);
+          mutex = false;
+        }
+        // test of explicit acquisition and release of exclusive access
         ex.acquireExclusive();
         {
           CHECK(!mutex);
@@ -206,5 +220,5 @@ uint64_t run_test(
   }
 }
 
-} // namespace test {
-} // namespace folly {
+} // namespace test
+} // namespace folly