summaryrefslogtreecommitdiff
path: root/src/threadengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/threadengine.cpp')
-rw-r--r--src/threadengine.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/threadengine.cpp b/src/threadengine.cpp
new file mode 100644
index 000000000..f7e924fb6
--- /dev/null
+++ b/src/threadengine.cpp
@@ -0,0 +1,38 @@
+#include "services.h"
+
+ThreadEngine threadEngine;
+
+/** Threads constructor
+ */
+Thread::Thread() : Exit(false)
+{
+}
+
+/** Threads destructor
+ */
+Thread::~Thread()
+{
+ Join();
+}
+
+/** Sets the exit state as true informing the thread we want it to shut down
+ */
+void Thread::SetExitState()
+{
+ Exit = true;
+}
+
+/** Returns the exit state of the thread
+ * @return true if we want to exit
+ */
+bool Thread::GetExitState() const
+{
+ return Exit;
+}
+
+/** Called to run the thread, should be overloaded
+ */
+void Thread::Run()
+{
+}
+