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:
parent
4e6790a5fa
commit
f31ee8d1bf
3 changed files with 4 additions and 3 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -540,6 +540,7 @@ dependencies = [
|
|||
"lspower",
|
||||
"nix",
|
||||
"notify",
|
||||
"num_cpus",
|
||||
"os_pipe",
|
||||
"percent-encoding",
|
||||
"pin-project",
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue