diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2018-10-25 13:21:44 +0200 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@qt.io> | 2018-10-31 09:35:28 +0000 |
commit | aa0e3d02d5a6a646594b04c753ebc1655e44a141 (patch) | |
tree | 8aa61dc6dcb43aa54965309ce041772571d3212e | |
parent | eb056ee233c80376a837beba8f712a0f1068dae3 (diff) |
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 <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/corelib/thread/qthread_win.cpp | 4 |
1 files changed, 0 insertions, 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) |