From 038ae17545335e5d1b33746b0193e85ee9f584fe Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 5 Jan 2015 23:05:29 +0000 Subject: Thought-necessary protection of TransferFunction::lut() for access from multiple threads. --- src/transfer_function.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/transfer_function.h') 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 #include +#include #include namespace dcp { @@ -43,8 +44,10 @@ protected: bool _inverse; -private: +private: mutable std::map _luts; + /** mutex to protect _luts */ + mutable boost::mutex _mutex; }; } -- cgit v1.2.3