From 4d4882d667c2c2eea180219e0c76d15cc1f49415 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 21 Feb 2008 17:27:55 +0000 Subject: Working thread test!!! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8983 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/threadengine.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'include') 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; + } }; -- cgit v1.2.3