Go to file
openharmony_ci db6742e386
!2 README.OpenSource 中License信息整改
Merge pull request !2 from peizhe/master
2023-05-05 02:26:02 +00:00
.github/workflows ci: merge ci files into 1 (#116) 2021-12-14 12:06:28 -08:00
ci/cgroups ci: set up github action workflow for rust (#114) 2021-12-14 10:49:27 -08:00
examples Add an example displaying the current number of CPUs 2019-06-03 16:05:47 -07:00
fixtures/cgroups fix(cgroup): fix parse zero or multi optional fields in mountinfo (#113) 2021-12-20 11:32:16 -08:00
src v1.13.1 2021-12-20 11:36:47 -08:00
.gitignore v0.1.0 2015-03-16 11:42:22 -07:00
BUILD.gn Add GN Build Files and Custom Modifications 2023-04-18 18:18:51 +08:00
Cargo.toml v1.13.1 2021-12-20 11:36:47 -08:00
CHANGELOG.md v1.13.1 2021-12-20 11:36:47 -08:00
CONTRIBUTING.md improve readme 2017-09-28 10:39:53 -07:00
LICENSE-APACHE Relicense as MIT/Apache-2.0. 2016-05-11 09:37:18 -04:00
LICENSE-MIT Relicense as MIT/Apache-2.0. 2016-05-11 09:37:18 -04:00
README.md Fix crates.io badge (#110) 2021-08-02 20:29:19 -07:00
README.OpenSource README.OpenSource 中License信息整改 2023-05-04 09:45:26 +08: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();