mirror of https://github.com/OpenTTD/OpenTTD
(svn r12916) -Fix: let ThreadObject_pthread::IsRunning() behave the same way as ThreadObject_Win32::IsRunning() does
parent
dd00683a46
commit
868c17a175
|
@ -63,7 +63,9 @@ public:
|
||||||
|
|
||||||
/* virtual */ bool IsRunning()
|
/* virtual */ bool IsRunning()
|
||||||
{
|
{
|
||||||
return m_thr != 0;
|
int sval;
|
||||||
|
sem_getvalue(&m_sem_stop, &sval);
|
||||||
|
return sval == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* virtual */ bool WaitForStop()
|
/* virtual */ bool WaitForStop()
|
||||||
|
|
Loading…
Reference in New Issue