diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-21 17:27:55 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-21 17:27:55 +0000 |
commit | 4d4882d667c2c2eea180219e0c76d15cc1f49415 (patch) | |
tree | 86acc379875db7359b342812bd18b7edbe3ee60a /include | |
parent | 4e5244a4d82ea5083c401ac04440cb8dd6003941 (diff) |
Working thread test!!!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8983 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r-- | include/threadengine.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/include/threadengine.h b/include/threadengine.h index 56ccce423..397b0085e 100644 --- a/include/threadengine.h +++ b/include/threadengine.h @@ -82,6 +82,8 @@ class CoreExport ThreadEngine : public Extensible */ class CoreExport Thread : public Extensible { + private: + bool ExitFlag; public: /** Creator thread engine @@ -90,7 +92,7 @@ class CoreExport Thread : public Extensible /** Set Creator to NULL at this point */ - Thread() : Creator(NULL) + Thread() : ExitFlag(false), Creator(NULL) { } @@ -107,6 +109,21 @@ class CoreExport Thread : public Extensible * threaded code here */ virtual void Run() = 0; + + void SetExitFlag() + { + ExitFlag = true; + } + + void ClearExitFlag() + { + ExitFlag = false; + } + + bool GetExitFlag() + { + return ExitFlag; + } }; |