/** Thread engine, Handles threading where required
*/
- ThreadEngine* Threads;
+ ThreadEngine Threads;
/** The thread/class used to read config files in REHASH and on startup
*/
DeleteZero(this->SNO);
DeleteZero(this->Config);
DeleteZero(this->PI);
- DeleteZero(this->Threads);
SocketEngine::Deinit();
Logs->CloseLogs();
DeleteZero(this->Logs);
// Initialize so that if we exit before proper initialization they're not deleted
this->Logs = 0;
- this->Threads = 0;
this->PI = 0;
this->Users = 0;
this->Config = 0;
SocketEngine::Init();
- this->Threads = new ThreadEngine;
-
/* Default implementation does nothing */
this->PI = new ProtocolInterface;
conns[id] = conn;
ServerInstance->Modules->AddService(*conn);
- ServerInstance->Threads->Start(conn);
+ ServerInstance->Threads.Start(conn);
}
else
{
{
ReadConf();
- ServerInstance->Threads->Start(queryDispatcher);
+ ServerInstance->Threads.Start(queryDispatcher);
}
~ModuleMsSQL()
void ModuleSQL::init()
{
Dispatcher = new DispatcherThread(this);
- ServerInstance->Threads->Start(Dispatcher);
+ ServerInstance->Threads.Start(Dispatcher);
}
ModuleSQL::~ModuleSQL()
if (!ServerInstance->ConfigThread)
{
ServerInstance->ConfigThread = new ConfigReaderThread(uuid);
- ServerInstance->Threads->Start(ServerInstance->ConfigThread);
+ ServerInstance->Threads.Start(ServerInstance->ConfigThread);
}
}