Skip to content

Commit

Permalink
Set the default number of threads to n_cpu-1 (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
calixteman authored and marco-c committed Jan 9, 2020
1 parent 01be516 commit c7a8ef4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use std::{process, thread};
use grcov::*;

fn main() {
let default_num_threads = (num_cpus::get() * 2).to_string();
let default_num_threads = 1.max(num_cpus::get() - 1).to_string();

let matches = App::new("grcov")
.version(crate_version!())
Expand Down

0 comments on commit c7a8ef4

Please sign in to comment.