From 26798eb31291ef9aa0127f559d9deb905e3458e9 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 14 Mar 2020 22:45:01 +0100 Subject: [PATCH] [util] Use SwitchToThread for yield According to MSDN, this doesn't interfere with scheduling of other threads, unlike Sleep(0). --- src/util/thread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/thread.h b/src/util/thread.h index c96cb1c0..4fab9e75 100644 --- a/src/util/thread.h +++ b/src/util/thread.h @@ -141,7 +141,7 @@ namespace dxvk { namespace this_thread { inline void yield() { - Sleep(0); + SwitchToThread(); } } }