From 6142289d4087030cd5e64154847aaf897fac17dc Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Tue, 26 May 2020 23:18:17 -0500 Subject: [PATCH] add a comment --- include/deal.II/base/thread_local_storage.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/deal.II/base/thread_local_storage.h b/include/deal.II/base/thread_local_storage.h index 2c96321bb3..59cdd3d908 100644 --- a/include/deal.II/base/thread_local_storage.h +++ b/include/deal.II/base/thread_local_storage.h @@ -230,6 +230,11 @@ namespace Threads /** * A mutex to guard insertion into the data object. + * + * We use a std::shared_timed_mutex (or std::shared_mutex if available) + * here to be able to use std::unique_lock and std::shared_lock for a + * readers-writer lock + * (https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock). */ # ifdef DEAL_II_HAVE_CXX17 std::shared_mutex insertion_mutex; -- 2.39.5