Hi Jules,
Is there a reason why the Thread::waitForThreadToExit impl on Windows do not use something like that ?
bool Thread::waitForThreadToExit (const int timeOutMilliseconds) const throw()
{
// Doh! So how exactly do you expect this thread to wait for itself to stop??
jassert (getThreadId() != getCurrentThreadId());
DWORD timeout = timeOutMilliseconds;
if (timeOutMilliseconds == -1)
timeout = INFINITE;
if (WAIT_FAILED == WaitForSingleObject(threadId, timeout))
return false;
return true;
}
Thanks,