implement RageEvent::Wait timeouts

This commit is contained in:
Glenn Maynard
2005-01-26 20:59:41 +00:00
parent 4757f00aba
commit 63604a6536
7 changed files with 35 additions and 11 deletions
+6 -2
View File
@@ -666,14 +666,18 @@ RageEvent::~RageEvent()
}
/* For each of these calls, the mutex must be locked, and must not be locked recursively. */
void RageEvent::Wait()
bool RageEvent::Wait( RageTimer *pTimeout )
{
ASSERT( IsLockedByThisThread() );
ASSERT( m_LockCnt == 0 );
m_pEvent->Wait();
/* A zero RageTimer also means no timeout. */
if( pTimeout != NULL && pTimeout->IsZero() )
pTimeout = NULL;
bool bRet = m_pEvent->Wait( pTimeout );
m_LockedBy = GetThisThreadId();
return bRet;
}
void RageEvent::Signal()