From 179520b737c3edf49947b116ec5b346d16ff6a31 Mon Sep 17 00:00:00 2001 From: nikitalita <69168929+nikitalita@users.noreply.github.com> Date: Thu, 28 Sep 2023 19:24:58 -0700 Subject: [PATCH] make startup callable multiple times --- Caprica/common/CapricaJobManager.cpp | 3 +-- Caprica/papyrus/PapyrusCompilationContext.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Caprica/common/CapricaJobManager.cpp b/Caprica/common/CapricaJobManager.cpp index 5d25465..971a92a 100644 --- a/Caprica/common/CapricaJobManager.cpp +++ b/Caprica/common/CapricaJobManager.cpp @@ -32,8 +32,7 @@ bool CapricaJob::tryRun() { void CapricaJobManager::startup(size_t initialWorkerCount) { defaultJob.await(); - - for (size_t i = 0; i < initialWorkerCount; i++) { + for (size_t i = workerCount; i < initialWorkerCount; i++) { std::thread thr { [this] { this->workerMain(); } }; diff --git a/Caprica/papyrus/PapyrusCompilationContext.cpp b/Caprica/papyrus/PapyrusCompilationContext.cpp index e97a68a..2ad7db7 100644 --- a/Caprica/papyrus/PapyrusCompilationContext.cpp +++ b/Caprica/papyrus/PapyrusCompilationContext.cpp @@ -73,7 +73,7 @@ void PapyrusCompilationNode::FileReadJob::run() { if (parent->type == NodeType::PapyrusCompile || parent->type == NodeType::PasCompile || parent->type == NodeType::PexDissassembly) { if (!conf::General::quietCompile) - std::cout << "Compiling " << parent->reportedName << std::endl; + std::cout << "Compiling " + parent->reportedName + "\n"; } // TODO: remove this hack when imports are working if (parent->sourceFilePath.starts_with("fake://")) {