After signalling an event, always wait for the signalled thread to touch

m_WaitersDone.  This fixes problems with

 event.Lock();
 event.Signal();
 while(x) event.Wait();

picking up the signal that it just sent (which is wrong), especially in the
debugger.
This commit is contained in:
Glenn Maynard
2005-01-27 01:19:24 +00:00
parent 582a2ec27a
commit 903aaadcc5
2 changed files with 9 additions and 13 deletions
@@ -57,7 +57,6 @@ private:
CRITICAL_SECTION m_iNumWaitingLock;
HANDLE m_WakeupSema;
HANDLE m_WaitersDone;
bool m_bNeedSignal;
};
class SemaImpl_Win32: public SemaImpl