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


##########
src/tests/containerizer/cgroups2_tests.cpp:
##########
@@ -181,6 +185,67 @@ TEST_F(Cgroups2Test, ROOT_CGROUPS2_AssignProcesses)
 }
 
 
+TEST_F(Cgroups2Test, ROOT_CGROUPS2_Threads)
+{
+  const size_t NUM_THREADS = 5;
+
+  ASSERT_SOME(cgroups2::create(TEST_CGROUP));
+
+  pid_t pid = ::fork();
+  ASSERT_NE(-1, pid);
+
+  if (pid == 0) {
+    vector<unique_ptr<std::thread>> runningThreads(NUM_THREADS);
+
+    for (size_t i = 0; i < NUM_THREADS; ++i) {
+      runningThreads[i] = unique_ptr<std::thread>(new std::thread([]() {
+        while (true);

Review Comment:
   maybe sleep instead of spinning on the cpu?



-- 
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