From: Denis Davydov Date: Tue, 30 Oct 2018 15:52:48 +0000 (+0100) Subject: add mutex lock X-Git-Tag: v9.1.0-rc1~588^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07069d7119b7e83fb079ff8924a1615311986c4f;p=dealii.git add mutex lock --- diff --git a/source/base/incremental_function.cc b/source/base/incremental_function.cc index 49bde1148c..18091c358d 100644 --- a/source/base/incremental_function.cc +++ b/source/base/incremental_function.cc @@ -50,6 +50,10 @@ namespace Functions const Point & p, const unsigned int comp) const { + // since we modify a mutable member variable, lock the + // the data via a mutex + std::lock_guard lock(mutex); + // Cache the time state of the base class in case it has been changed // within the user code. We reset the wrapped function to the original // state once we're done with our own evaluations.