Skip to content

Commit 9c96d7f

Browse files
lukechildsMylesBorins
authored andcommitted
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: #16282 Fixes: #16279 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent c26abc8 commit 9c96d7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/os.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ added: v0.3.3
5858
* Returns: {Array}
5959

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

6363
The properties included on each object include:
6464

0 commit comments

Comments
 (0)