doc: add a note about os.cpus() returning an empty list

It is not obvious that in some cases cpus() returns an empty list and
this has caused a bug before:
https://github.com/isaacs/promise-call-limit/pull/11

PR-URL: https://github.com/nodejs/node/pull/47363
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
codedokode authored and Moshe Atlow committed 2023-07-07 00:06:02 +03:00
1 parent fdc59b8e14
commit 7db2e889ac
1 file changed
+2
+2
View File
@@ -74,6 +74,8 @@ added: v0.3.3
* Returns: {Object\[]}
Returns an array of objects containing information about each logical CPU core.
The array will be empty if no CPU information is available, such as if the
`/proc` file system is unavailable.
The properties included on each object include: