* +------------------------------------+
*
* InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
* the file COPYING for details.
#include "inspircd.h"
#include "threadengine.h"
-ThreadEngine::ThreadEngine(InspIRCd* Instance) : ServerInstance(Instance)
-{
-}
-
-ThreadEngine::~ThreadEngine()
-{
-}
-
-Mutex::Mutex(InspIRCd* Instance) : ServerInstance(Instance)
+/** If this thread has a Creator set, call it to
+ * free the thread
+ */
+Thread::~Thread()
{
+ if (state)
+ {
+ state->FreeThread(this);
+ delete state;
+ }
}