From f6f5f31067cdee2d7003d8209361ac9e5b6975c5 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 13 Jun 2021 12:42:52 +0200 Subject: Use vfork/exec instead of system for compiler invocation. --- libcppbuild.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libcppbuild.cc') diff --git a/libcppbuild.cc b/libcppbuild.cc index 82a70d1..2167173 100644 --- a/libcppbuild.cc +++ b/libcppbuild.cc @@ -23,7 +23,7 @@ int main(int argc, const char* argv[]) settings.builddir = "build/foo"; settings.parallel_processes = - std::max(1u, std::thread::hardware_concurrency() * 3); + std::max(1u, std::thread::hardware_concurrency() * 2 - 1); std::filesystem::path builddir(settings.builddir); std::filesystem::create_directories(builddir); @@ -82,7 +82,7 @@ int main(int argc, const char* argv[]) return task->run(); })); ++task; - std::this_thread::sleep_for(10ms); + std::this_thread::sleep_for(2ms); } for(auto process = processes.begin(); @@ -100,7 +100,7 @@ int main(int argc, const char* argv[]) } } - std::this_thread::sleep_for(10ms); + std::this_thread::sleep_for(2ms); } for(auto process = processes.begin(); -- cgit v1.2.3