summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/threadutil.cpp6
-rw-r--r--noncore/multimedia/opieplayer2/threadutil.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/threadutil.cpp b/noncore/multimedia/opieplayer2/threadutil.cpp
index 5687f42..a5cc92d 100644
--- a/noncore/multimedia/opieplayer2/threadutil.cpp
+++ b/noncore/multimedia/opieplayer2/threadutil.cpp
@@ -215,8 +215,14 @@ bool Thread::wait()
return d->finishCondition.wait( d->guard );
}
+bool Thread::isRunning() const
+{
+ AutoLock lock( d->guard );
+ return d->isRunning;
+}
+
void Thread::exit()
{
pthread_exit( 0 );
}
diff --git a/noncore/multimedia/opieplayer2/threadutil.h b/noncore/multimedia/opieplayer2/threadutil.h
index b537cc1..b67b61d 100644
--- a/noncore/multimedia/opieplayer2/threadutil.h
+++ b/noncore/multimedia/opieplayer2/threadutil.h
@@ -99,8 +99,10 @@ namespace ThreadUtil
void terminate();
bool wait();
+ bool isRunning() const;
+
static void exit();
protected:
virtual void run() = 0;