* +------------------------------------+
*
* 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.
/* Close logging */
this->Logs->CloseLogs();
DeleteZero(this->Logs);
-
- delete RehashFinishMutex;
}
void InspIRCd::Restart(const std::string &reason)
SE = SEF->Create(this);
delete SEF;
- ThreadEngineFactory* tef = new ThreadEngineFactory();
- this->Threads = tef->Create(this);
- delete tef;
- this->Mutexes = new MutexFactory(this);
+ this->Threads = new ThreadEngine(this);
/* Default implementation does nothing */
this->PI = new ProtocolInterface(this);
Exit(0);
}
- RehashFinishMutex = Mutexes->CreateMutex();
-
while (true)
{
#ifndef WIN32
#endif
/* Check if there is a config thread which has finished executing but has not yet been freed */
- RehashFinishMutex->Lock();
- if (this->ConfigThread && this->ConfigThread->GetExitFlag())
+ if (this->ConfigThread && this->ConfigThread->IsDone())
{
/* Rehash has completed */
delete ConfigThread;
ConfigThread = NULL;
}
- RehashFinishMutex->Unlock();
/* time() seems to be a pretty expensive syscall, so avoid calling it too much.
* Once per loop iteration is pleanty.