diff options
author | Markus Härer <markus.haerer@gmx.net> | 2016-07-05 21:13:50 +0200 |
---|---|---|
committer | Markus Härer <markus.haerer@gmx.net> | 2016-07-16 23:34:01 +0200 |
commit | 95a314fc85eb6d645f633ab4006391b86f719752 (patch) | |
tree | 65a41610b882de6dcad0c4c251174f544bd3a161 | |
parent | 999a9b2ef6f9d06ac9a67fb119d9c66a0b1f58c0 (diff) |
[fix] Make CEventGroup::m_bRunning an std::atomic<bool>
to make sure no data race can happen.
-rw-r--r-- | xbmc/network/EventServer.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xbmc/network/EventServer.h b/xbmc/network/EventServer.h index 97869ec51b..72129bfbb9 100644 --- a/xbmc/network/EventServer.h +++ b/xbmc/network/EventServer.h @@ -26,6 +26,7 @@ #include "threads/CriticalSection.h" #include "threads/SingleLock.h" +#include <atomic> #include <map> #include <queue> #include <vector> @@ -82,7 +83,7 @@ namespace EVENTSERVER int m_iListenTimeout; int m_iMaxClients; unsigned char* m_pPacketBuffer; - bool m_bRunning; + std::atomic<bool> m_bRunning; CCriticalSection m_critSection; bool m_bRefreshSettings; }; |