[libcxx-commits] [libcxx] [libc++] Make std::unique_lock available with _LIBCPP_HAS_NO_THREADS (PR #99562)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 23 10:02:37 PDT 2024


================
@@ -0,0 +1,88 @@
+//===----------------------------------------------------------------------===//
----------------
ldionne wrote:

Not attached to this file: The tests used to also exercise the interoperation between `std::unique_lock` and `std::mutex` because that's the only type we used. Now, they don't anymore.

So in theory `std::unique_lock<std::mutex>` could be broken and we wouldn't really notice anymore. Can you add a general-purpose test that is `UNSUPPORTED: no-threads` and that uses `std::unique_lock<std::mutex>` in a couple of different ways. No need to have 100% testing coverage for `unique_lock`'s API, but let's at least make sure that it's not broken since that would be embarrassing.

https://github.com/llvm/llvm-project/pull/99562


More information about the libcxx-commits mailing list