diff options
Diffstat (limited to 'Source/Core/VideoCommon/AsyncRequests.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/AsyncRequests.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/AsyncRequests.cpp b/Source/Core/VideoCommon/AsyncRequests.cpp index a824d0020a..9a32b9ad48 100644 --- a/Source/Core/VideoCommon/AsyncRequests.cpp +++ b/Source/Core/VideoCommon/AsyncRequests.cpp @@ -97,6 +97,12 @@ void AsyncRequests::PushEvent(const AsyncRequests::Event& event, bool blocking) } } +void AsyncRequests::WaitForEmptyQueue() +{ + std::unique_lock<std::mutex> lock(m_mutex); + m_cond.wait(lock, [this] { return m_queue.empty(); }); +} + void AsyncRequests::SetEnable(bool enable) { std::unique_lock<std::mutex> lock(m_mutex); |
