fixes return values of wxSemaphore::TryWait() and WaitTimeout() to behave as documented
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -532,8 +532,17 @@ wxSemaError wxSemaphoreInternal::WaitTimeout(unsigned long milliseconds)
|
||||
return wxSEMA_TIMEOUT;
|
||||
}
|
||||
|
||||
if ( m_cond.WaitTimeout(remainingTime) != wxCOND_NO_ERROR )
|
||||
return wxSEMA_MISC_ERROR;
|
||||
switch ( m_cond.WaitTimeout(remainingTime) )
|
||||
{
|
||||
case wxCOND_TIMEOUT:
|
||||
return wxSEMA_TIMEOUT;
|
||||
|
||||
default:
|
||||
return wxSEMA_MISC_ERROR;
|
||||
|
||||
case wxCOND_NO_ERROR:
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
m_count--;
|
||||
|
Reference in New Issue
Block a user