diff options
author | Håvard Pettersen <havardpe@oath.com> | 2019-12-18 11:44:41 +0000 |
---|---|---|
committer | Håvard Pettersen <havardpe@oath.com> | 2019-12-18 11:44:41 +0000 |
commit | 42b699064ea2deec741bff6ee492108c939b4b95 (patch) | |
tree | 071cfb3fb1b6d32a3b43ac1194ad0c96549a8dbb /eval/src | |
parent | df2c5af2a00f850f0e3c4919ad3b651efffea3fc (diff) |
compile in throw-away thread when not using an executor
this is more similar to old behavior
Diffstat (limited to 'eval/src')
-rw-r--r-- | eval/src/vespa/eval/eval/llvm/compile_cache.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/eval/src/vespa/eval/eval/llvm/compile_cache.cpp b/eval/src/vespa/eval/eval/llvm/compile_cache.cpp index b486a750992..9a262f6dca5 100644 --- a/eval/src/vespa/eval/eval/llvm/compile_cache.cpp +++ b/eval/src/vespa/eval/eval/llvm/compile_cache.cpp @@ -2,6 +2,7 @@ #include "compile_cache.h" #include <vespa/eval/eval/key_gen.h> +#include <thread> namespace vespalib { namespace eval { @@ -50,7 +51,7 @@ CompileCache::Token::UP CompileCache::compile(const Function &function, PassParams pass_params) { Token::UP token; - CompileTask::UP task; + Executor::Task::UP task; vespalib::string key = gen_key(function, pass_params); { std::lock_guard<std::mutex> guard(_lock); @@ -71,7 +72,7 @@ CompileCache::compile(const Function &function, PassParams pass_params) } } if (task) { - task->run(); + std::thread([&task](){ task.get()->run(); }).join(); } return token; } |