mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
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:
1 parent
c26abc8e94
commit
9c96d7f4fd
1 file changed
+1
-1
+1
-1
@@ -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:
|
||||
|
||||
|
||||
Reference in new issue
Block a user