You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[doc] add platform availabity information for os.sched_getaffinity #88047
changed the title [-]add platform availabity information for os.sched_getaffinity[/-][+][doc] add platform availabity information for os.sched_getaffinity[/+]on Mar 29, 2022
changed the title [-]add platform availabity information for os.sched_getaffinity[/-][+][doc] add platform availabity information for os.sched_getaffinity[/+]on Mar 29, 2022
#109907 added os.process_cpu_count, a way to get the info on Windows as well -- and on any other platform where we know how to do this. That function is documented to return None if we don't know.
I'll close this issue, and the PR. Apologies for not getting to it sooner.
Activity
iritkatriel commentedon Mar 29, 2022
It might help if you provide motivation for the change. In particular, explain why you believe the current text is incorrect.
[-]add platform availabity information for os.sched_getaffinity[/-][+][doc] add platform availabity information for os.sched_getaffinity[/+][-]add platform availabity information for os.sched_getaffinity[/-][+][doc] add platform availabity information for os.sched_getaffinity[/+]guoci commentedon Mar 29, 2022
os.sched_getaffinityis only available on some Unix platforms, as documented inhttps://docs.python.org/dev/library/os.html#interface-to-the-scheduler
For example, on Windows we will get the error:
AttributeError: module 'os' has no attribute 'sched_getaffinity'
encukou commentedon Mar 28, 2024
#109907 added
os.process_cpu_count, a way to get the info on Windows as well -- and on any other platform where we know how to do this. That function is documented to returnNoneif we don't know.I'll close this issue, and the PR. Apologies for not getting to it sooner.