From 031bc4a8b0dc456aca4d70dc260f626b64cd82b3 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 5 May 2010 18:14:06 -0400 Subject: Merged branch threadingengine with master - Added a threading engine --- src/threadengine.cpp | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/threadengine.cpp (limited to 'src/threadengine.cpp') 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() +{ +} + -- cgit