From d93c2073896e63aca5a859fe7182ba24dbe84cd3 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sun, 28 May 2017 19:16:05 +0500 Subject: 2017-05-28 --- src/world/World.cpp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'src/world/World.cpp') diff --git a/src/world/World.cpp b/src/world/World.cpp index af76fd5..d13d01d 100644 --- a/src/world/World.cpp +++ b/src/world/World.cpp @@ -84,27 +84,9 @@ Section World::ParseSection(byte *data, size_t &dataLen) { } World::~World() { - isContinue = false; - m_parseSectionWaiter.notify_all(); - m_sectionParseThread.join(); -} - -void World::SectionParsingThread() { - while (isContinue) { - std::unique_lock sectionParseLocker(m_parseSectionMutex); - m_parseSectionWaiter.wait(sectionParseLocker); - while (m_sectionToParse.size() == 0 && isContinue) { - m_parseSectionWaiter.wait(sectionParseLocker); - } - while (m_sectionToParse.size() > 0) { - auto it = m_sectionToParse.front(); - m_sectionToParse.pop(); - it->second.Parse(); - } - } } World::World() { - m_sectionParseThread = std::thread(&World::SectionParsingThread, this); + } -- cgit v1.2.3