Merge pull request #49682 from lyuma/thread_work_done

Consider a thread done if current_work is null
This commit is contained in:
Rémi Verschelde 2021-06-17 15:12:12 +02:00 committed by GitHub
commit 7e4c466fff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ public:
} }
bool is_done_dispatching() const { 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; return index.load(std::memory_order_acquire) >= current_work->max_elements;
} }