DevinLeamy commented on code in PR #546:
URL: https://github.com/apache/mesos/pull/546#discussion_r1548713825


##########
src/tests/containerizer/cgroups2_tests.cpp:
##########
@@ -181,6 +194,55 @@ TEST_F(Cgroups2Test, ROOT_CGROUPS2_AssignProcesses)
 }
 
 
+TEST_F(Cgroups2Test, ROOT_CGROUPS2_Threads)
+{
+  const size_t NUM_THREADS = 5;
+  std::thread* runningThreads[NUM_THREADS];
+
+  Latch* latch = new Latch();
+
+  for (size_t i = 0; i < NUM_THREADS; ++i) {
+    runningThreads[i] = new std::thread([=]() {
+      // Wait until the main thread tells us to exit.
+      latch->await();
+    });
+  }

Review Comment:
   Updated to fork. Removed the `Latch` and made the threads `unique_ptr`s to 
have RAII.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to