Tools/mmaps: Change the PCQ queue to uint32 again

6f272ea5b7 re-added support for non-pointer types
This commit is contained in:
DDuarte
2014-07-27 17:33:42 +01:00
parent 6f272ea5b7
commit eabf0f44dd
2 changed files with 4 additions and 9 deletions

View File

@@ -171,19 +171,14 @@ namespace MMAP
{
while (1)
{
uint32* mapId = nullptr;
uint32 mapId;
_queue.WaitAndPop(mapId);
if (_cancelationToken)
return;
if (!mapId) // shouldn't happen?
continue;
buildMap(*mapId);
delete mapId;
buildMap(mapId);
}
}
@@ -205,7 +200,7 @@ namespace MMAP
if (!shouldSkipMap(mapId))
{
if (threads > 0)
_queue.Push(new uint32(mapId));
_queue.Push(mapId);
else
buildMap(mapId);
}

View File

@@ -143,7 +143,7 @@ namespace MMAP
rcContext* m_rcContext;
std::vector<std::thread> _workerThreads;
ProducerConsumerQueue<uint32*> _queue;
ProducerConsumerQueue<uint32> _queue;
std::atomic<bool> _cancelationToken;
};
}