wait 60s max in debug builds, 15s max in optimized

This commit is contained in:
Chris Danford
2004-08-08 15:46:53 +00:00
parent 0aae5eef32
commit d47ab7e9f9
+8 -3
View File
@@ -188,13 +188,18 @@ void SemaImpl_Win32::Post()
bool SemaImpl_Win32::Wait()
{
int len = 60000;
// 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;
while( tries-- )
{
/* Wait for 60 seconds. In debug builds, some screens may take longer
* than 15 seconds to load. If it takes longer than that, we're
/* Wait for 15 seconds. If it takes longer than that, we're
* probably deadlocked. */
if( SimpleWaitForSingleObject( sem, len ) )
{