X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fthreadengine.cpp;h=c2976c0479c2340f00f475c819719185f9848d8b;hb=2553e4fff7a5a168ef796dcecb73c7365651c897;hp=124102f0ccb055a9138b6f898077a3205c4fe665;hpb=b6dbd6caab62bc2c0d11ce5a45d511611eb9c2ef;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/threadengine.cpp b/src/threadengine.cpp index 124102f0c..c2976c047 100644 --- a/src/threadengine.cpp +++ b/src/threadengine.cpp @@ -20,14 +20,21 @@ #include "inspircd.h" #include "threadengine.h" -ThreadEngine::ThreadEngine(InspIRCd* Instance) : ServerInstance(Instance) +void Thread::SetExitFlag() { + ExitFlag = true; } -ThreadEngine::~ThreadEngine() +void Thread::join() { + state->FreeThread(this); + delete state; + state = 0; } -Mutex::Mutex(InspIRCd* Instance) : ServerInstance(Instance) +/** If this thread has a Creator set, call it to + * free the thread + */ +Thread::~Thread() { }