mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00:00
Fifo: Replace busy loop with condition variable
This commit is contained in:
parent
ea50dc240d
commit
279c657cda
3 changed files with 54 additions and 38 deletions
|
@ -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();});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue