gh-109649: Add os.process_cpu_count() function by vstinner · Pull Request #109907 · python/cpython

@vstinner vstinner marked this pull request as ready for review

September 29, 2023 13:33

gpshead

gpshead

corona10

gpshead

gpshead

@vstinner

* Refactor os_sched_getaffinity_impl(): move variable definitions to
  their first assignment.
* Fix test_posix.test_sched_getaffinity(): restore the old CPU mask
  when the test completes!
* Doc: Specify that os.cpu_count() counts *logicial* CPUs.
* Doc: Specify that os.sched_getaffinity(0) is related to the calling
  thread.

@vstinner

Glyphack pushed a commit to Glyphack/cpython that referenced this pull request

Sep 2, 2024
* Refactor os_sched_getaffinity_impl(): move variable definitions to
  their first assignment.
* Fix test_posix.test_sched_getaffinity(): restore the old CPU mask
  when the test completes!
* Doc: Specify that os.cpu_count() counts *logicial* CPUs.
* Doc: Specify that os.sched_getaffinity(0) is related to the calling
  thread.