summaryrefslogtreecommitdiff
path: root/libcppbuild.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-06-13 12:42:52 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2021-06-13 12:42:52 +0200
commitf6f5f31067cdee2d7003d8209361ac9e5b6975c5 (patch)
treec967ca817c31fd5681032d1c545f0c812aabb236 /libcppbuild.cc
parent6bcbf18a6a67707c13d66b96770c8b210a45b9f4 (diff)
Use vfork/exec instead of system for compiler invocation.
Diffstat (limited to 'libcppbuild.cc')
-rw-r--r--libcppbuild.cc6
1 files changed, 3 insertions, 3 deletions
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();