doc: clarify os.cpus() returns logical CPU cores

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: https://github.com/nodejs/node/pull/16282
Fixes: https://github.com/nodejs/node/issues/16279
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
Luke Childs authored and Myles Borins committed 2017-11-28 13:10:34 +09:00
1 parent c26abc8e94
commit 9c96d7f4fd
1 file changed
+1 -1
+1 -1
View File
@@ -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: