From 4b51a7e4a9cd87d91b3bd78f9eb8992e236f307e Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 11 Jun 2009 19:41:35 +0000 Subject: [PATCH] yielding the timeslice, win32 --- panda/src/pipeline/threadSimpleManager.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/panda/src/pipeline/threadSimpleManager.cxx b/panda/src/pipeline/threadSimpleManager.cxx index 035e7876b4..10194a9002 100644 --- a/panda/src/pipeline/threadSimpleManager.cxx +++ b/panda/src/pipeline/threadSimpleManager.cxx @@ -474,7 +474,10 @@ system_yield() { } #ifdef WIN32 - Sleep(0); + // 1 ms is the smallest effective time we can request on Windows; + // Sleep(0) doesn't seem to actually yield? Or at least it doesn't + // yield enough. + Sleep(1); #else // We use select() as the only way that seems to actually yield the