cyb70289 commented on code in PR #46034: URL: https://github.com/apache/arrow/pull/46034#discussion_r2032276816
########## cpp/src/arrow/util/cpu_info.cc: ########## @@ -513,7 +514,7 @@ struct CpuInfo::Impl { OsRetrieveCacheSize(&cache_sizes); OsRetrieveCpuInfo(&hardware_flags, &vendor, &model_name); original_hardware_flags = hardware_flags; - num_cores = std::max(static_cast<int>(std::thread::hardware_concurrency()), 1); + num_cores = std::max(GetAffinityCpuCount(), 1); Review Comment: Looks good to me. `num_cores()` as hardware limit. `num_affinity_cores()` as actual resource available. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org