mirror of
https://github.com/openharmony/third_party_rust_num_cpus.git
synced 2026-07-01 20:44:00 -04:00
Document always returning at least 1 core (#106)
This commit is contained in:
@@ -47,6 +47,8 @@ use linux::{get_num_cpus, get_num_physical_cpus};
|
||||
/// This function will get the number of logical cores. Sometimes this is different from the number
|
||||
/// of physical cores (See [Simultaneous multithreading on Wikipedia][smt]).
|
||||
///
|
||||
/// This will always return at least `1`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
@@ -75,6 +77,8 @@ pub fn get() -> usize {
|
||||
|
||||
/// Returns the number of physical cores of the current system.
|
||||
///
|
||||
/// This will always return at least `1`.
|
||||
///
|
||||
/// # Note
|
||||
///
|
||||
/// Physical count is supported only on Linux, mac OS and Windows platforms.
|
||||
|
||||
Reference in New Issue
Block a user