Skip to content

Commit

Permalink
chore: Adjust WalkParallel heuristic for multithreading
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpovel committed Jul 17, 2024
1 parent 71d71d2 commit 0385740
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/ignore/src/walk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@ impl WalkParallel {

fn threads(&self) -> usize {
if self.threads == 0 {
2
std::thread::available_parallelism().map_or(1, |n| n.get()).min(12)
} else {
self.threads
}
Expand Down

0 comments on commit 0385740

Please sign in to comment.