From 82e2739bae198f5854629a1a3a93f2186513f783 Mon Sep 17 00:00:00 2001 From: elsid Date: Fri, 8 Mar 2019 15:27:16 +0300 Subject: [PATCH] Notify workers when only at least one job is posted --- components/detournavigator/asyncnavmeshupdater.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/detournavigator/asyncnavmeshupdater.cpp b/components/detournavigator/asyncnavmeshupdater.cpp index ce52c1416..6cfd75b27 100644 --- a/components/detournavigator/asyncnavmeshupdater.cpp +++ b/components/detournavigator/asyncnavmeshupdater.cpp @@ -87,7 +87,8 @@ namespace DetourNavigator log("posted ", mJobs.size(), " jobs"); - mHasJob.notify_all(); + if (!mJobs.empty()) + mHasJob.notify_all(); } void AsyncNavMeshUpdater::wait()