[libcxx-commits] [libcxx] [libc++] atomic timed wait (PR #172214)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jan 16 10:29:54 PST 2026
================
@@ -0,0 +1,53 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: no-threads
+// UNSUPPORTED: c++03, c++11, c++14, c++17
+
+// ADDITIONAL_COMPILE_FLAGS: -O3
+
+// <semaphore>
+
+#include <barrier>
+#include <chrono>
+#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 = 50000;
----------------
ldionne wrote:
I'd reduce this to speed up the test:
```suggestion
constexpr auto num_iterations = 5000;
```
https://github.com/llvm/llvm-project/pull/172214
More information about the libcxx-commits
mailing list