wxSemaError err = m_semaphore.WaitTimeout(milliseconds);
- if ( err == wxSEMA_BUSY )
+ if ( err == wxSEMA_TIMEOUT )
{
// another potential race condition exists here it is caused when a
// 'waiting' thread timesout, and returns from WaitForSingleObject, but
m_mutex.Lock();
- return err == wxSEMA_NO_ERROR ? wxCOND_NO_ERROR : wxCOND_MISC_ERROR;
+ return err == wxSEMA_NO_ERROR ? wxCOND_NO_ERROR
+ : err == wxSEMA_TIMEOUT ? wxCOND_TIMEOUT
+ : wxCOND_MISC_ERROR;
}
wxCondError wxConditionInternal::Signal()