1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

fix(test): default to num cpus when no value is given (#10443)

This commit is contained in:
Casper Beyer 2021-04-30 20:57:42 +08:00 committed by GitHub
parent 4e6790a5fa
commit f31ee8d1bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

1
Cargo.lock generated
View file

@ -540,6 +540,7 @@ dependencies = [
"lspower",
"nix",
"notify",
"num_cpus",
"os_pipe",
"percent-encoding",
"pin-project",

View file

@ -56,6 +56,7 @@ libc = "0.2.93"
log = { version = "0.4.14", features = ["serde"] }
lspower = "1.0.0"
notify = "5.0.0-pre.7"
num_cpus = "1.13.0"
percent-encoding = "2.1.0"
pin-project = "1.0.6"
regex = "1.4.3"

View file

@ -1683,9 +1683,8 @@ fn test_parse(flags: &mut Flags, matches: &clap::ArgMatches) {
if let Some(value) = matches.value_of("jobs") {
value.parse().unwrap()
} else {
// TODO(caspervonb) when no value is given use
// https://doc.rust-lang.org/std/thread/fn.available_concurrency.html
2
// TODO(caspervonb) drop the dependency on num_cpus when https://doc.rust-lang.org/std/thread/fn.available_concurrency.html becomes stable.
num_cpus::get()
}
} else {
1