Skip to content

Commit a41c529

Browse files
committed
set default threads to logical cpu count
1 parent 1d4a2e7 commit a41c529

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub struct Cli {
2121
pub address: Option<String>,
2222

2323
/// Number of worker threads to use for mining.
24-
#[arg(long, default_value_t = 24)]
24+
#[arg(long, default_value_t = std::thread::available_parallelism().map(|n| n.get() as u32).unwrap_or(24))]
2525
pub threads: u32,
2626

2727
/// Optional secret key (hex-encoded) to mine with.

0 commit comments

Comments
 (0)