From: Matthias Maier Date: Wed, 27 May 2020 04:18:17 +0000 (-0500) Subject: add a comment X-Git-Tag: v9.3.0-rc1~1535^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6142289d4087030cd5e64154847aaf897fac17dc;p=dealii.git add a comment --- 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;