Make `std:🧵:available_concurrency` support process-limited number of CPUs
Use `libc::sched_getaffinity` and count the number of CPUs in the returned mask. This handles cases where the process doesn't have access to all CPUs, such as when limited via `taskset` or similar.
This also covers cgroup cpusets.
|
||
|---|---|---|
| .. | ||
| common | ||
| hermit | ||
| itron | ||
| sgx | ||
| solid | ||
| unix | ||
| unsupported | ||
| wasi | ||
| wasm | ||
| windows | ||
| mod.rs | ||