Fix windows build by removing sys-info (#8860) (#8973)

automerge
This commit is contained in:
Michael Vines
2020-03-19 18:14:01 -07:00
committed by GitHub
parent 58a36ce484
commit 7ae2464cf3
10 changed files with 25 additions and 25 deletions

View File

@@ -10,5 +10,5 @@ license = "Apache-2.0"
edition = "2018"
[dependencies]
num_cpus = "1.0.0"
lazy_static = "1.4.0"
sys-info = "0.5.9"

View File

@@ -6,7 +6,7 @@ extern crate lazy_static;
lazy_static! {
// reduce the number of threads each pool is allowed to half the cpu core count, to avoid rayon
// hogging cpu
static ref MAX_RAYON_THREADS: usize = sys_info::cpu_num().unwrap() as usize / 2;
static ref MAX_RAYON_THREADS: usize = num_cpus::get() as usize / 2;
}
pub fn get_thread_count() -> usize {