increase number of retries to avoid timeout while debugging
This commit is contained in:
@@ -121,7 +121,7 @@ static bool SimpleWaitForSingleObject( HANDLE h, DWORD ms )
|
|||||||
bool MutexImpl_Win32::Lock()
|
bool MutexImpl_Win32::Lock()
|
||||||
{
|
{
|
||||||
int len = 15000;
|
int len = 15000;
|
||||||
int tries = 2;
|
int tries = 5;
|
||||||
|
|
||||||
while( tries-- )
|
while( tries-- )
|
||||||
{
|
{
|
||||||
@@ -129,7 +129,7 @@ bool MutexImpl_Win32::Lock()
|
|||||||
if( SimpleWaitForSingleObject( mutex, len ) )
|
if( SimpleWaitForSingleObject( mutex, len ) )
|
||||||
return true;
|
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
|
* timeout, just in case we're debugging and happened to stop while waiting
|
||||||
* on the mutex. */
|
* on the mutex. */
|
||||||
len = 1000;
|
len = 1000;
|
||||||
@@ -188,14 +188,8 @@ void SemaImpl_Win32::Post()
|
|||||||
|
|
||||||
bool SemaImpl_Win32::Wait()
|
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;
|
int len = 15000;
|
||||||
#endif
|
int tries = 5;
|
||||||
int tries = 2;
|
|
||||||
|
|
||||||
while( tries-- )
|
while( tries-- )
|
||||||
{
|
{
|
||||||
@@ -207,7 +201,7 @@ bool SemaImpl_Win32::Wait()
|
|||||||
return true;
|
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
|
* timeout, just in case we're debugging and happened to stop while waiting
|
||||||
* on the mutex. */
|
* on the mutex. */
|
||||||
len = 1000;
|
len = 1000;
|
||||||
|
|||||||
Reference in New Issue
Block a user