From 8c722cabd777c368d67c88be5b663f9ad9bb394d Mon Sep 17 00:00:00 2001
From: artivis <deray.jeremie@gmail.com>
Date: Tue, 5 Jun 2018 09:23:39 +0200
Subject: [PATCH] state_block::_is_fixed made atomic

---
 src/state_block.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/state_block.h b/src/state_block.h
index 75af37ae6..619f39268 100644
--- a/src/state_block.h
+++ b/src/state_block.h
@@ -49,7 +49,7 @@ public:
 
         NodeBaseWPtr node_ptr_; //< pointer to the wolf Node owning this StateBlock
 
-        bool fixed_; ///< Key to indicate whether the state is fixed or not
+        std::atomic_bool fixed_; ///< Key to indicate whether the state is fixed or not
 
         std::atomic<int> state_size_; ///< State vector size
         Eigen::VectorXs state_; ///< State vector storing the state values
@@ -198,7 +198,7 @@ inline Size StateBlock::getLocalSize() const
 
 inline bool StateBlock::isFixed() const
 {
-    return fixed_;
+    return fixed_.load();
 }
 
 inline void StateBlock::fix()
@@ -213,7 +213,7 @@ inline void StateBlock::unfix()
 
 inline void StateBlock::setFixed(bool _fixed)
 {
-    fixed_ = _fixed;
+    fixed_.store(_fixed);
     addNotification(Notification::FIX_UPDATE);
 }
 
-- 
GitLab