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