Fixup #111 Document the number of utilized cores and use 1 core at least

This commit is contained in:
Peter Palaga
2020-10-21 14:50:22 +02:00
committed by Guillaume Nodet
parent 1b18bd4a37
commit 59fc315777
2 changed files with 4 additions and 3 deletions

View File

@@ -234,7 +234,7 @@ public class DefaultClient implements Client {
static void setDefaultArgs(List<String> args) {
if (args.stream().noneMatch(arg -> arg.startsWith("-T") || arg.equals("--threads"))) {
int procs = Runtime.getRuntime().availableProcessors() - 1;
final int procs = Math.max(Runtime.getRuntime().availableProcessors() - 1, 1);
args.add("-T" + procs);
}
if (args.stream().noneMatch(arg -> arg.startsWith("-b") || arg.equals("--builder"))) {