Fix island example freeze when submitting work too quickly

This commit is contained in:
vittorioromeo 2024-09-26 14:48:27 +02:00 committed by Lukas Dürrenberger
parent d2ca038e2a
commit a9c56da99e

View File

@ -398,7 +398,7 @@ void generateTerrain(sf::Vertex* buffer)
{
const std::lock_guard lock(workQueueMutex);
if (workQueue.empty())
if (pendingWorkCount == 0u)
break;
}