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 RafaelGSS committed 2023-04-08 15:18:07 -03:00
1 parent 9dc6aef98d
commit 0bbce034f9
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: