Permalink
Browse files

gsdx: Don't use atomic for exit variable

All accesses are protected by locks, so there's no need for it to be
atomic.
  • Loading branch information...
1 parent cb2c9ce commit c2e21fa30ef5593d081b33c4884200601cbe8e96 @turtleli turtleli committed with gregory38 Jan 2, 2017
Showing with 2 additions and 2 deletions.
  1. +2 −2 plugins/GSdx/GSThread_CXX11.h
@@ -29,7 +29,7 @@ template<class T, int CAPACITY> class GSJobQueue final
private:
std::thread m_thread;
std::function<void(T&)> m_func;
- std::atomic<bool> m_exit;
+ bool m_exit;
ringbuffer_base<T, CAPACITY> m_queue;
std::mutex m_lock;
@@ -43,7 +43,7 @@ template<class T, int CAPACITY> class GSJobQueue final
while (true) {
while (m_queue.empty()) {
- if (m_exit.load(memory_order_relaxed))
+ if (m_exit)
return;
m_notempty.wait(l);

0 comments on commit c2e21fa

Please sign in to comment.