2021-08-02 20:29:19 -07:00
2020-04-09 12:49:16 -07:00
2017-05-25 16:37:26 -07:00
2015-03-16 11:42:22 -07:00
2020-04-09 12:49:16 -07:00
2020-04-15 09:15:12 -07:00
2017-09-28 10:39:53 -07:00
2016-05-11 09:37:18 -04:00
2016-05-11 09:37:18 -04:00
2021-08-02 20:29:19 -07:00

num_cpus

crates.io Travis CI Status AppVeyor status

Count the number of CPUs on the current machine.

Usage

Add to Cargo.toml:

[dependencies]
num_cpus = "1.0"

In your main.rs or lib.rs:

extern crate num_cpus;

// count logical cores this process could try to use
let num = num_cpus::get();
S
Description
计算当前设备的CPU数量
Readme 265 KiB
Languages
Rust 99.6%
Dockerfile 0.4%