[libcxx-commits] [libcxx] [tzdb] Replace shared_mutex with mutex. (PR #87929)

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Sun Apr 7 10:28:47 PDT 2024


================
@@ -16,7 +16,7 @@
 
 // When threads are not available the locking is not required.
 #ifndef _LIBCPP_HAS_NO_THREADS
-#  include <shared_mutex>
+#  include <mutex>
----------------
mordante wrote:

Can you add some comment why `mutex` is better than `shared_mutex` and refer to the benchmark?
This should discourage optimizing this code by using a `shared_mutex`.

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


More information about the libcxx-commits mailing list