Merge pull request #90809 from RandomShaper/fixup_wtp_yield
WorkerThreadPool: Polish yielding (fix corner case, remove misleading warning)
This commit is contained in:
commit
26d8ae0849
@ -491,12 +491,10 @@ void WorkerThreadPool::notify_yield_over(TaskID p_task_id) {
|
|||||||
ERR_FAIL_MSG("Invalid Task ID.");
|
ERR_FAIL_MSG("Invalid Task ID.");
|
||||||
}
|
}
|
||||||
Task *task = *taskp;
|
Task *task = *taskp;
|
||||||
|
if (task->completed) {
|
||||||
#ifdef DEBUG_ENABLED
|
task_mutex.unlock();
|
||||||
if (task->pool_thread_index == get_thread_index()) {
|
return;
|
||||||
WARN_PRINT("A worker thread is attempting to notify itself. That makes no sense.");
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
ThreadData &td = threads[task->pool_thread_index];
|
ThreadData &td = threads[task->pool_thread_index];
|
||||||
td.yield_is_over = true;
|
td.yield_is_over = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user