From c2e21fa30ef5593d081b33c4884200601cbe8e96 Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Mon, 2 Jan 2017 13:52:54 +0000 Subject: [PATCH] gsdx: Don't use atomic for exit variable All accesses are protected by locks, so there's no need for it to be atomic. --- plugins/GSdx/GSThread_CXX11.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/GSdx/GSThread_CXX11.h b/plugins/GSdx/GSThread_CXX11.h index a178142092..938b609710 100644 --- a/plugins/GSdx/GSThread_CXX11.h +++ b/plugins/GSdx/GSThread_CXX11.h @@ -29,7 +29,7 @@ template class GSJobQueue final private: std::thread m_thread; std::function m_func; - std::atomic m_exit; + bool m_exit; ringbuffer_base m_queue; std::mutex m_lock; @@ -43,7 +43,7 @@ private: while (true) { while (m_queue.empty()) { - if (m_exit.load(memory_order_relaxed)) + if (m_exit) return; m_notempty.wait(l);