Skip to content

Commit

Permalink
doc: clarify os.cpus() returns logical CPU cores
Browse files Browse the repository at this point in the history
Original text implied it returns physical cpu cores. This is misleading
as `os.cpus().length` is often used to get the CPU core count in
Node.js. In reality that will return the thread count which may not be
what the user intended.

PR-URL: #16282
Fixes: #16279
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
lukechilds authored and MylesBorins committed Nov 28, 2017
1 parent c26abc8 commit 9c96d7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/os.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ added: v0.3.3
* Returns: {Array}

The `os.cpus()` method returns an array of objects containing information about
each CPU/core installed.
each logical CPU core.

The properties included on each object include:

Expand Down

0 comments on commit 9c96d7f

Please sign in to comment.