gsdx: Don't use atomic for exit variable

All accesses are protected by locks, so there's no need for it to be
atomic.
This commit is contained in:
Jonathan Li 2017-01-02 13:52:54 +00:00 committed by Gregory Hainaut
parent cb2c9ce4e6
commit c2e21fa30e
1 changed files with 2 additions and 2 deletions

View File

@ -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 @@ private:
while (true) {
while (m_queue.empty()) {
if (m_exit.load(memory_order_relaxed))
if (m_exit)
return;
m_notempty.wait(l);