fix(Core/Shutdown): add checks to see if MapUpdater threads are joineable (#7450)

This commit is contained in:
Petric
2021-11-24 10:41:49 +00:00
committed by GitHub
parent fc16abc30e
commit 11373cd78a
4 changed files with 3 additions and 7 deletions

View File

@@ -69,7 +69,7 @@ Map::~Map()
{
WorldObject* obj = *i_worldObjects.begin();
ASSERT(obj->IsWorldObject());
LOG_ERROR("maps", "Map::~Map: WorldObject TypeId is not a corpse! (%u)", static_cast<uint8>(obj->GetTypeId()));
LOG_DEBUG("maps", "Map::~Map: WorldObject TypeId is not a corpse! (%u)", static_cast<uint8>(obj->GetTypeId()));
//ASSERT(obj->GetTypeId() == TYPEID_CORPSE);
obj->RemoveFromWorld();
obj->ResetMap();

View File

@@ -74,11 +74,6 @@ MapUpdater::MapUpdater(): pending_requests(0)
{
}
MapUpdater::~MapUpdater()
{
deactivate();
}
void MapUpdater::activate(size_t num_threads)
{
_workerThreads.reserve(num_threads);

View File

@@ -31,7 +31,7 @@ class MapUpdater
{
public:
MapUpdater();
virtual ~MapUpdater();
~MapUpdater() = default;
void schedule_update(Map& map, uint32 diff, uint32 s_diff);
void schedule_lfg_update(uint32 diff);

View File

@@ -2119,6 +2119,7 @@ void World::SetInitialWorldSettings()
if (sConfigMgr->isDryRun())
{
sMapMgr->UnloadAll();
LOG_INFO("server.loading", "AzerothCore dry run completed, terminating.");
exit(0);
}