diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-05-28 16:16:05 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-05-28 16:16:05 +0200 |
commit | d93c2073896e63aca5a859fe7182ba24dbe84cd3 (patch) | |
tree | 6144aaf7e01854fe245011ca4f4735974366febb /src/world/World.cpp | |
parent | 2017-05-26 (diff) | |
download | AltCraft-d93c2073896e63aca5a859fe7182ba24dbe84cd3.tar AltCraft-d93c2073896e63aca5a859fe7182ba24dbe84cd3.tar.gz AltCraft-d93c2073896e63aca5a859fe7182ba24dbe84cd3.tar.bz2 AltCraft-d93c2073896e63aca5a859fe7182ba24dbe84cd3.tar.lz AltCraft-d93c2073896e63aca5a859fe7182ba24dbe84cd3.tar.xz AltCraft-d93c2073896e63aca5a859fe7182ba24dbe84cd3.tar.zst AltCraft-d93c2073896e63aca5a859fe7182ba24dbe84cd3.zip |
Diffstat (limited to 'src/world/World.cpp')
-rw-r--r-- | src/world/World.cpp | 20 |
1 files changed, 1 insertions, 19 deletions
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<std::mutex> 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); + } |