プロセッサ
論理 CPU コア数を確認する
num_cpus::get を使用して、現在のマシンの論理 CPU コア数を表示します。
fn main() {
println!("Number of logical cores is {}", num_cpus::get());
}
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
num_cpus::get を使用して、現在のマシンの論理 CPU コア数を表示します。
fn main() {
println!("Number of logical cores is {}", num_cpus::get());
}