From c21aa9196e1f33cd04d7c25cb973adba5c3e6195 Mon Sep 17 00:00:00 2001 From: Lyuma Date: Thu, 17 Jun 2021 05:22:43 -0700 Subject: Consider a thread done if current_work is null --- core/templates/thread_work_pool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/templates/thread_work_pool.h b/core/templates/thread_work_pool.h index 9f7a692cc5..b242648bc8 100644 --- a/core/templates/thread_work_pool.h +++ b/core/templates/thread_work_pool.h @@ -105,7 +105,7 @@ public: } bool is_done_dispatching() const { - ERR_FAIL_COND_V(current_work == nullptr, false); + ERR_FAIL_COND_V(current_work == nullptr, true); return index.load(std::memory_order_acquire) >= current_work->max_elements; } -- cgit v1.2.3