mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-09 21:25:55 +08:00
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:
@@ -58,6 +58,11 @@ CThread& CThread::operator=(const CThread& thread)
|
||||
return *this;
|
||||
}
|
||||
|
||||
void CThread::init()
|
||||
{
|
||||
CThreadRep::initThreads();
|
||||
}
|
||||
|
||||
void CThread::sleep(double timeout)
|
||||
{
|
||||
CThreadPtr currentRep(CThreadRep::getCurrentThreadRep());
|
||||
|
||||
Reference in New Issue
Block a user