Skip to content

Commit

Permalink
chore: Replace num_cpus crate with std call (rome#3163)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser authored Sep 7, 2022
1 parent 02e6cdd commit 6e717fd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion xtask/coverage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ serde_yaml = "0.9.9"
regex = "1.5.5"
once_cell = "1.9.0"
walkdir = "2.3.2"
num_cpus = "1.13.1"
atty = "0.2.14"
tracing = "0.1.34"
tracing-subscriber = { version = "0.3.11", features = ["env-filter", "std"] }
Expand Down
6 changes: 5 additions & 1 deletion xtask/coverage/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,11 @@ pub fn run(
let mut context = TestRunContext {
filter: filter.map(|s| s.to_string()),
reporter: &mut reporters,
pool: &yastl::Pool::new(num_cpus::get().max(2)),
pool: &yastl::Pool::new(
std::thread::available_parallelism()
.map_or(2, usize::from)
.max(2),
),
};

let mut ran_any_tests = false;
Expand Down

0 comments on commit 6e717fd

Please sign in to comment.