From 688499cca0f2283670ed2a8dcef1abf2303ab588 Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 20 May 2021 20:33:39 +0200 Subject: [PATCH] Actually queue up the job in prop instance merger. --- prop_instance_merger.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/prop_instance_merger.cpp b/prop_instance_merger.cpp index dba31ea..c267816 100644 --- a/prop_instance_merger.cpp +++ b/prop_instance_merger.cpp @@ -49,6 +49,10 @@ typedef class RenderingServer VS; #include "./singleton/prop_texture_cache.h" #endif +#if THREAD_POOL_PRESENT +#include "../thread_pool/thread_pool.h" +#endif + Ref PropInstanceMerger::get_job() { return _job; } @@ -243,6 +247,12 @@ void PropInstanceMerger::_build() { return; prop_preprocess(Transform(), _prop_data); + +#if THREAD_POOL_PRESENT + ThreadPool::get_singleton()->add_job(_job); +#else + _job->execute(); +#endif } void PropInstanceMerger::_build_finished() {