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 <[email protected]>
Reviewed-By: Bryan English <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
lukechilds authored and vsemozhetbyt committed Oct 18, 2017
1 parent 9be3d99 commit 19ab261
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 19ab261

Please sign in to comment.