We seem to also have ambiguity about what Environment.ProcessorCount returns. According to the docs, it should return "the number of processors on the current machine".
cc @janvorli @kouvel
Originally posted by @jkotas in dotnet/coreclr#27543 (comment)
We seem to also have ambiguity about what
Environment.ProcessorCountreturns. According to the docs, it should return "the number of processors on the current machine".SYSTEM_INFO::dwNumberOfProcessors. This sounds correct. I assume that this number cannot change during the process lifetime.CPUGroupInfo::GetNumActiveProcessors. Can this number change during the process lifetime?HAVE_SCHED_GETAFFINITY, it returns the process affinity at the process start: https://github.com/dotnet/coreclr/blob/6ce179a17061abbbe9f904f878943a28c8041a62/src/pal/src/misc/sysinfo.cpp#L161_SC_NPROCESSORS_CONF. This sounds correct._SC_NPROCESSORS_ONLNat the process start. That does not sound right.cc @janvorli @kouvel
Originally posted by @jkotas in dotnet/coreclr#27543 (comment)