allow not timing out on semaphore waits

This commit is contained in:
Glenn Maynard
2004-08-29 22:51:09 +00:00
parent abe10501f7
commit 085f354f8a
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -661,13 +661,13 @@ void RageSemaphore::Post()
m_pSema->Post();
}
void RageSemaphore::Wait()
void RageSemaphore::Wait( bool bFailOnTimeout )
{
retry:
if( m_pSema->Wait() )
return;
if( Dialog::IsShowingDialog() )
if( !bFailOnTimeout || Dialog::IsShowingDialog() )
goto retry;
/* We waited too long. We're probably deadlocked, though unlike mutexes, we can't