mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-03-03 14:32:22 +02:00
chore: Adjust WalkParallel
heuristic for multithreading
See also 71d71d2d98/crates/core/flags/hiargs.rs (L172)
Closes #2854
This commit is contained in:
parent
71d71d2d98
commit
038574004a
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user