[libcxx-commits] [libcxx] [libc++][test][NFC] remove unused variables in the test (PR #179038)
Thibault Monnier via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Jan 31 16:17:30 PST 2026
================
@@ -14,39 +14,37 @@
// Test that counting_semaphore::try_acquire_for does not suffer from lost wakeup
// under stress testing.
-#include <barrier>
#include <chrono>
+#include <functional>
#include <semaphore>
#include <thread>
#include <vector>
#include "make_test_thread.h"
-static std::counting_semaphore<> s(0);
constexpr auto num_acquirer = 100;
constexpr auto num_iterations = 5000;
-static std::barrier<> b(num_acquirer + 1);
-void acquire() {
+void acquire(std::counting_semaphore<>& s) {
----------------
Thibault-Monnier wrote:
Why not keep `s` at the global scope?
https://github.com/llvm/llvm-project/pull/179038
More information about the libcxx-commits
mailing list