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
The os.cpus() method returns an array of objects containing information about each CPU/core installed.
It would be more accurate to use the word "threads" rather than "CPU/core". Not sure if this behaviour is intentional or due to how the OS reports cores. Either way, a note in the docs would be helpful to clarify this. Do you want a PR?
The word "threads" seems a bit confusing here. AFAICT os.cpus() returns information about each logical core on Linux, MacOS and Windows, so a better phrasing would be ..about each logical CPU/core installed, or just add a note mentioning it reports stats on logical cores instead of physical ones (maybe + a link explaining what hyperthreading is).
Activity
joyeecheung commentedon Oct 18, 2017
The word "threads" seems a bit confusing here. AFAICT
os.cpus()returns information about each logical core on Linux, MacOS and Windows, so a better phrasing would be..about each logical CPU/core installed, or just add a note mentioning it reports stats on logical cores instead of physical ones (maybe + a link explaining what hyperthreading is).lukechilds commentedon Oct 18, 2017
Logical core seems like a more accurate description 👍
joyeecheung commentedon Oct 18, 2017
@lukechilds A PR would be very welcomed. Check out our contributing guide if you want to submit one. :)
doc: clarify os.cpus() returns logical CPU cores
doc: clarify os.cpus() returns logical CPU cores
doc: clarify os.cpus() returns logical CPU cores
doc: clarify os.cpus() returns logical CPU cores
doc: clarify os.cpus() returns logical CPU cores
doc: clarify os.cpus() returns logical CPU cores