Fifo: Replace busy loop with condition variable

This commit is contained in:
degasus
2015-03-05 17:12:24 +01:00
committed by degasus
parent ea50dc240d
commit 279c657cda
3 changed files with 54 additions and 38 deletions

View File

@ -1,4 +1,5 @@
#include "VideoCommon/AsyncRequests.h"
#include "VideoCommon/Fifo.h"
#include "VideoCommon/RenderBase.h"
AsyncRequests AsyncRequests::s_singleton;
@ -49,6 +50,7 @@ void AsyncRequests::PushEvent(const AsyncRequests::Event& event, bool blocking)
m_queue.push(event);
RunGpu();
if (blocking)
{
m_cond.wait(lock, [this]{return m_queue.empty();});