Skip to content

Commit

Permalink
Add lock for grabbing chunk location information.
Browse files Browse the repository at this point in the history
Close #76
  • Loading branch information
abellgithub committed Sep 28, 2021
1 parent 0a026d1 commit e649ee2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bu/PyramidManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ OctantInfo PyramidManager::removeComplete(const VoxelKey& k)
// where the chunk should be written.
uint64_t PyramidManager::newChunk(const VoxelKey& key, uint32_t size, uint32_t count)
{
static std::mutex m;

std::unique_lock<std::mutex> lock(m);
return m_copc.newChunk(key, size, count);
}

Expand Down

0 comments on commit e649ee2

Please sign in to comment.