From 9c34d27a8bc724722e9cae203e0c455573c3d5f1 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 5 Sep 2012 18:30:34 +0200 Subject: menu: use boost::shared_mutex Use everywhere a mutable boost::shared_mutex to enable locking during const getter and the multiple reader and single writer pattern. --- src/menu/drawable_control.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/menu/drawable_control.hpp') diff --git a/src/menu/drawable_control.hpp b/src/menu/drawable_control.hpp index 5d2aee27..ecee373d 100644 --- a/src/menu/drawable_control.hpp +++ b/src/menu/drawable_control.hpp @@ -26,7 +26,7 @@ #define DRAWABLE_CONTROL_HPP #include -#include +#include #include #include "drawable.hpp" @@ -51,10 +51,10 @@ namespace usdx Background* background; - boost::mutex position_mutex; - boost::mutex size_mutex; - boost::mutex clipping_required_mutex; - boost::mutex background_mutex; + mutable boost::shared_mutex position_mutex; + mutable boost::shared_mutex size_mutex; + mutable boost::shared_mutex clipping_required_mutex; + mutable boost::shared_mutex background_mutex; protected: Container* parent; -- cgit v1.2.3