From 2a8ac1c05b9cdc4e96bfd1f6f828d9dba85d3698 Mon Sep 17 00:00:00 2001 From: clayjohn Date: Wed, 30 Jul 2025 23:15:38 -0700 Subject: [PATCH] Allow processing low priority threads on calling thread in the WTP. This fixes a recent regression. In theory, low priority tasks should always go to the queue and never be executed on the calling thread. However, when using NO_THREADS build, all tasks need to execute on the calling thread. --- core/object/worker_thread_pool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/object/worker_thread_pool.cpp b/core/object/worker_thread_pool.cpp index 70057b5a9d2..cc382d5cd26 100644 --- a/core/object/worker_thread_pool.cpp +++ b/core/object/worker_thread_pool.cpp @@ -225,7 +225,7 @@ void WorkerThreadPool::_post_tasks(Task **p_tasks, uint32_t p_count, bool p_high // in custom builds. // Avoid calling pump tasks or low priority tasks from the calling thread. - bool process_on_calling_thread = threads.is_empty() && p_high_priority && !p_pump_task; + bool process_on_calling_thread = threads.is_empty() && !p_pump_task; if (process_on_calling_thread) { p_lock.temp_unlock(); for (uint32_t i = 0; i < p_count; i++) {