update available_parallelism docs since cgroups and sched_getaffinity are now taken into account

This commit is contained in:
The 8472 2022-03-03 00:36:23 +01:00
parent af6d2ed245
commit e18abbf2ac

View File

@ -1524,7 +1524,10 @@ fn _assert_both<T: Send + Sync>() {}
///
/// On Linux:
/// - It may overcount the amount of parallelism available when limited by a
/// process-wide affinity mask, or when affected by cgroup limits.
/// process-wide affinity mask or cgroup quotas and cgroup2 fs or `sched_getaffinity()` can't be
/// queried, e.g. due to sandboxing.
/// - It may undercount the amount of parallelism if the current thread's affinity mask
/// does not reflect the process' cpuset, e.g. due to pinned threads.
///
/// On all targets:
/// - It may overcount the amount of parallelism available when running in a VM