summaryrefslogtreecommitdiff
path: root/src/transfer_function.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-01-05 23:05:29 +0000
committerCarl Hetherington <cth@carlh.net>2015-01-05 23:05:29 +0000
commit038ae17545335e5d1b33746b0193e85ee9f584fe (patch)
tree1aceda1d202a2e991d8384136f38d246439d2edb /src/transfer_function.h
parentc2018e0dae9ed2503b6244a47524a7ce16eedb0b (diff)
Thought-necessary protection of TransferFunction::lut() for access from multiple threads.
Diffstat (limited to 'src/transfer_function.h')
-rw-r--r--src/transfer_function.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/transfer_function.h b/src/transfer_function.h
index 16d00c1a..4105f3d4 100644
--- a/src/transfer_function.h
+++ b/src/transfer_function.h
@@ -22,6 +22,7 @@
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
+#include <boost/thread/mutex.hpp>
#include <map>
namespace dcp {
@@ -43,8 +44,10 @@ protected:
bool _inverse;
-private:
+private:
mutable std::map<int, double*> _luts;
+ /** mutex to protect _luts */
+ mutable boost::mutex _mutex;
};
}