[Issue 19513] Use sched_getaffinity(2) to get the number of CPU cores if available
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue May 28 16:23:21 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19513
Dlang Bot <dlang-bot at dlang.rocks> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/phobos pull request #7030 "Fix Issue 19513 - Use sched_getaffinity(2) to
get the number of CPU cores if abailable" was merged into master:
- d17f2eb9f298b8b4957ee74603445d2211ff41d7 by Hiroki Noda:
Fix Issue 19513 - Use sched_getaffinity(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's better to use sched_getaffinity(2).
ref: http://man7.org/linux/man-pages/man1/nproc.1.html
https://github.com/dlang/phobos/pull/7030
--
More information about the Digitalmars-d-bugs
mailing list