From 468bbfda34453f50b533701c8ef50ad22def092a Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Tue, 24 Aug 2010 21:42:47 -0400 Subject: Replace thread engine with job engine --- src/server.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/server.cpp') diff --git a/src/server.cpp b/src/server.cpp index a52cde91f..a95fcece1 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -47,13 +47,11 @@ void InspIRCd::Exit(int status) void InspIRCd::Rehash(const std::string &reason) { - ServerInstance->SNO->WriteToSnoMask('a', "Rehashing config file %s %s",ServerConfig::CleanFilename(ServerInstance->ConfigFileName.c_str()), reason.c_str()); - ServerInstance->RehashUsersAndChans(); - FOREACH_MOD(I_OnGarbageCollect, OnGarbageCollect()); - if (!ServerInstance->ConfigThread) + if (!ServerInstance->PendingRehash) { - ServerInstance->ConfigThread = new ConfigReaderThread(""); - ServerInstance->Threads->Start(ServerInstance->ConfigThread); + ServerInstance->SNO->WriteToSnoMask('a', "Rehashing config file %s %s",ServerConfig::CleanFilename(ServerInstance->ConfigFileName.c_str()), reason.c_str()); + ServerInstance->PendingRehash = new ConfigReaderThread(""); + ServerInstance->Threads->Submit(ServerInstance->PendingRehash); } } -- cgit v1.3.1-10-gc9f91