From a9c56da99ecad924da3875af6bcf990d9bf56589 Mon Sep 17 00:00:00 2001 From: vittorioromeo Date: Thu, 26 Sep 2024 14:48:27 +0200 Subject: [PATCH] Fix `island` example freeze when submitting work too quickly --- examples/island/Island.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/island/Island.cpp b/examples/island/Island.cpp index c8d324c9d..11982309f 100644 --- a/examples/island/Island.cpp +++ b/examples/island/Island.cpp @@ -398,7 +398,7 @@ void generateTerrain(sf::Vertex* buffer) { const std::lock_guard lock(workQueueMutex); - if (workQueue.empty()) + if (pendingWorkCount == 0u) break; }