diff options
author | ygorshenin <mipt.vi002@gmail.com> | 2015-11-09 16:02:04 +0300 |
---|---|---|
committer | ygorshenin <mipt.vi002@gmail.com> | 2015-11-09 16:02:04 +0300 |
commit | 6435be5c64d4065781d17134f8d6dea4b8f90cef (patch) | |
tree | 8a923476ccfb5bd5f64898ac83ca7bbf3251ce3e /routing/routing_session.hpp | |
parent | ef80aa694bce3195210822c774e23296d06eaa55 (diff) | |
parent | aa68f96324ab5779f9edefcecc70f4643fcfcae3 (diff) |
Merge pull request #417 from bykoianko/making-m_state-as-atomic
Bugfix. Using atomic instead of direct calls for RoutingSession::m_state which is used at least from 3 threads.
Diffstat (limited to 'routing/routing_session.hpp')
-rw-r--r-- | routing/routing_session.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routing/routing_session.hpp b/routing/routing_session.hpp index a9d14c3e45..d25a34b77c 100644 --- a/routing/routing_session.hpp +++ b/routing/routing_session.hpp @@ -14,6 +14,7 @@ #include "base/deferred_task.hpp" #include "base/mutex.hpp" +#include "std/atomic.hpp" #include "std/limits.hpp" #include "std/unique_ptr.hpp" @@ -144,7 +145,7 @@ private: private: unique_ptr<AsyncRouter> m_router; Route m_route; - State m_state; + atomic<State> m_state; m2::PointD m_endPoint; size_t m_lastWarnedSpeedCameraIndex; SpeedCameraRestriction m_lastFoundCamera; |