fixed timeout bug in CThreadRep::wait() (negative timeout wouldn't

wait forever).  also fixed early return from sleep due to signal.
now forcing client to initialize CThread to ensure global mutex
gets initialized before threads are used.
This commit is contained in:
crs
2001-10-14 18:29:43 +00:00
parent 6aba3a6f57
commit b3291bc2b5
13 changed files with 92 additions and 21 deletions

View File

@@ -1,6 +1,7 @@
#include "CTimerThread.h"
#include "CThread.h"
#include "TMethodJob.h"
#include "CLog.h"
#include <assert.h>
//
@@ -24,7 +25,9 @@ CTimerThread::~CTimerThread()
void CTimerThread::timer(void*)
{
log((CLOG_DEBUG "timeout in %f seconds", m_timeout));
CThread::sleep(m_timeout);
log((CLOG_DEBUG "timeout"));
m_callingThread->cancel();
}