Skip to content

Commit

Permalink
update available_parallelism docs since cgroups and sched_getaffinity…
Browse files Browse the repository at this point in the history
… are now taken into account
  • Loading branch information
the8472 committed Mar 2, 2022
1 parent af6d2ed commit e18abbf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion library/std/src/thread/mod.rs
Expand Up @@ -1524,7 +1524,10 @@ fn _assert_sync_and_send() {
///
/// 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
Expand Down

0 comments on commit e18abbf

Please sign in to comment.