aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu/text.hpp
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2012-09-05 18:30:34 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2013-01-13 22:40:53 +0100
commit9c34d27a8bc724722e9cae203e0c455573c3d5f1 (patch)
tree47066bed3a0dabf41fc7e7e103b71473e86db70c /src/menu/text.hpp
parent6887913d9abf9240d1b138936868c2a5dc91cac9 (diff)
downloadusdx-9c34d27a8bc724722e9cae203e0c455573c3d5f1.tar.gz
usdx-9c34d27a8bc724722e9cae203e0c455573c3d5f1.tar.xz
usdx-9c34d27a8bc724722e9cae203e0c455573c3d5f1.zip
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.
Diffstat (limited to '')
-rw-r--r--src/menu/text.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/menu/text.hpp b/src/menu/text.hpp
index 064763e3..d32a2523 100644
--- a/src/menu/text.hpp
+++ b/src/menu/text.hpp
@@ -27,7 +27,7 @@
#include <string>
#include <ftgl.h>
-#include <boost/thread/mutex.hpp>
+#include <boost/thread/shared_mutex.hpp>
#include <log4cpp/Category.hh>
#include "drawable_control.hpp"
@@ -70,7 +70,7 @@ namespace usdx
FTFont *font;
const VerticalTextAlignment *valign;
- boost::mutex font_mutex;
+ mutable boost::shared_mutex font_mutex;
/**
* This function is used to recalculate the offset of the drawn