diff options
author | Adam <Adam@drink-coca-cola.info> | 2010-05-05 18:14:06 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-06-18 20:58:54 -0400 |
commit | 031bc4a8b0dc456aca4d70dc260f626b64cd82b3 (patch) | |
tree | 74f9c217963e45f54c787ed83fc6d494232f5cd4 /src/threadengine.cpp | |
parent | 503958aa77382a85a041e195d04b7a2ec51589e3 (diff) |
Merged branch threadingengine with master - Added a threading engine
Diffstat (limited to 'src/threadengine.cpp')
-rw-r--r-- | src/threadengine.cpp | 38 |
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() +{ +} + |