From 9d011d3489c0e51167e571b894e7667a50eca48c Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 22 Aug 2004 15:03:05 +0000 Subject: [PATCH] increase number of retries to avoid timeout while debugging --- stepmania/src/arch/Threads/Threads_Win32.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/stepmania/src/arch/Threads/Threads_Win32.cpp b/stepmania/src/arch/Threads/Threads_Win32.cpp index 5076869c98..98709ad718 100644 --- a/stepmania/src/arch/Threads/Threads_Win32.cpp +++ b/stepmania/src/arch/Threads/Threads_Win32.cpp @@ -121,7 +121,7 @@ static bool SimpleWaitForSingleObject( HANDLE h, DWORD ms ) bool MutexImpl_Win32::Lock() { int len = 15000; - int tries = 2; + int tries = 5; while( tries-- ) { @@ -129,7 +129,7 @@ bool MutexImpl_Win32::Lock() if( SimpleWaitForSingleObject( mutex, len ) ) return true; - /* Timed out; probably deadlocked. Try again one more time, with a smaller + /* Timed out; probably deadlocked. Try a couple more times, with a smaller * timeout, just in case we're debugging and happened to stop while waiting * on the mutex. */ len = 1000; @@ -188,14 +188,8 @@ void SemaImpl_Win32::Post() bool SemaImpl_Win32::Wait() { - // In debug builds, some screens may take longer than 15 seconds to load. - // Wait 60 seconds in debug, 15 in optimized. -#ifdef DEBUG - int len = 60000; -#else int len = 15000; -#endif - int tries = 2; + int tries = 5; while( tries-- ) { @@ -207,7 +201,7 @@ bool SemaImpl_Win32::Wait() return true; } - /* Timed out; probably deadlocked. Try again one more time, with a smaller + /* Timed out; probably deadlocked. Try again a few more times, with a smaller * timeout, just in case we're debugging and happened to stop while waiting * on the mutex. */ len = 1000;