diff options
-rw-r--r-- | src/thread_pthread.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/thread_pthread.cpp b/src/thread_pthread.cpp index 7aa0fda18..4645e4027 100644 --- a/src/thread_pthread.cpp +++ b/src/thread_pthread.cpp @@ -63,7 +63,9 @@ public: /* virtual */ bool IsRunning() { - return m_thr != 0; + int sval; + sem_getvalue(&m_sem_stop, &sval); + return sval == 0; } /* virtual */ bool WaitForStop() |