From aa0e3d02d5a6a646594b04c753ebc1655e44a141 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Thu, 25 Oct 2018 13:21:44 +0200 Subject: winrt: Use SwitchToThread instead of Sleep(0) UWP also supports SwitchToThread. The usage of Sleep(0) was a leftover that was forgotten when porting to desktop Window's approach of handling threads. Change-Id: I5e3d6fb3eefe07407b910cc6a6b45781d320e151 Reviewed-by: Friedemann Kleint Reviewed-by: Simon Hausmann Reviewed-by: Thiago Macieira --- src/corelib/thread/qthread_win.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp index e04d27d7b6..e56fe2c6ae 100644 --- a/src/corelib/thread/qthread_win.cpp +++ b/src/corelib/thread/qthread_win.cpp @@ -465,11 +465,7 @@ int QThread::idealThreadCount() Q_DECL_NOTHROW void QThread::yieldCurrentThread() { -#if !defined(Q_OS_WINRT) SwitchToThread(); -#else - ::Sleep(0); -#endif } #endif // QT_CONFIG(thread) -- cgit v1.2.3