From 07069d7119b7e83fb079ff8924a1615311986c4f Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Tue, 30 Oct 2018 16:52:48 +0100 Subject: [PATCH] add mutex lock --- source/base/incremental_function.cc | 4 ++++ 1 file changed, 4 insertions(+) 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. -- 2.39.5