Skip to content

Commit bacde43

Browse files
committed
always switch on initial signal
1 parent 68bc79f commit bacde43

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

game_clean/copy/tf/tc2

tier0/threadtools.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,12 +577,12 @@ bool CThreadSyncObject::Wait( uint32 dwTimeout )
577577
// Lock because we want to sync m_bSignaled
578578
std::unique_lock<std::mutex> lock(m_Mutex);
579579
bool bRet = m_bSignaled;
580-
if (dwTimeout == 0)
580+
if (bRet || dwTimeout == 0)
581581
{
582582
// Emulate context switch behavior seen in other waits
583583
ThreadSleep(0);
584584
}
585-
else if (!bRet)
585+
else
586586
{
587587
if (dwTimeout == TT_INFINITE)
588588
{

0 commit comments

Comments
 (0)