diff options
Diffstat (limited to 'core/object/worker_thread_pool.cpp')
-rw-r--r-- | core/object/worker_thread_pool.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/object/worker_thread_pool.cpp b/core/object/worker_thread_pool.cpp index afe6ecd1b3..d285be3e70 100644 --- a/core/object/worker_thread_pool.cpp +++ b/core/object/worker_thread_pool.cpp @@ -31,6 +31,7 @@ #include "worker_thread_pool.h" #include "core/os/os.h" +#include "core/os/thread_safe.h" void WorkerThreadPool::Task::free_template_userdata() { ERR_FAIL_COND(!template_userdata); @@ -178,6 +179,9 @@ void WorkerThreadPool::_process_task(Task *p_task) { if (post) { task_available_semaphore.post(); } + + // Engine/user tasks can set-and-forget, so we must be sure it's back to normal by the end of the task. + set_current_thread_safe_for_nodes(false); } } |