mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-11-13 18:53:05 +01:00
vulkan: fix more excessive waiting in scheduler
This commit is contained in:
1 parent
79d776850a
commit
af8ce05caa
1 file changed
+5
-4
@@ -65,12 +65,13 @@ void Scheduler::WaitWorker() {
|
||||
DispatchWork();
|
||||
|
||||
// Ensure the queue is drained.
|
||||
std::unique_lock ql{queue_mutex};
|
||||
event_cv.wait(ql, [this] { return work_queue.empty(); });
|
||||
{
|
||||
std::unique_lock ql{queue_mutex};
|
||||
event_cv.wait(ql, [this] { return work_queue.empty(); });
|
||||
}
|
||||
|
||||
// Now wait for execution to finish.
|
||||
// This needs to be done in the same order as WorkerThread.
|
||||
std::unique_lock el{execution_mutex};
|
||||
std::scoped_lock el{execution_mutex};
|
||||
}
|
||||
|
||||
void Scheduler::DispatchWork() {
|
||||
|
||||
Reference in new issue
Block a user