Win32 yieldThread(): use SwitchToThread() instead of Sleep(0)
authorSimon Marlow <marlowsd@gmail.com>
Wed, 27 Jan 2010 13:31:06 +0000 (13:31 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Wed, 27 Jan 2010 13:31:06 +0000 (13:31 +0000)
rts/win32/OSThreads.c

index 4103469..c9cb5d6 100644 (file)
@@ -86,7 +86,7 @@ waitCondition ( Condition* pCond, Mutex* pMut )
 void
 yieldThread()
 {
-  Sleep(0);
+  SwitchToThread();
   return;
 }