RhysU/jobserver

Use get affinity

RhysU opened this issue · 0 comments

RhysU commented

Per os.cpu_count() use the better query for default number of slots...

Return the number of CPUs in the system. Returns None if undetermined.

This number is not equivalent to the number of CPUs the current process can use. The number of usable CPUs can be obtained with len(os.sched_getaffinity(0))