affinity(2) to get the number of CPU
cores if available
Currently std.parallelism.totalCPUs is implemented by
sysconf(_SC_NPROCESSORS_ONLN) on Posix platoform. However, on GNU/Linux,
usable number of processors may be restricted if a process runs in
container. In case it'
created dlang/phobos pull request #7030 "Fix Issue 19513 - Use
sched_getaffinity(2) to get the number of CPU cores if abailable" fixing this
issue:
- Fix Issue 19513 - Use sched_getaffinity(2) to get the number of CPU
cores if available
Currently std.parallelism.totalCPUs is impl