Skip to content

Commit 7db2e88

Browse files
codedokodeMoLow
authored andcommitted
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: isaacs/promise-call-limit#11 PR-URL: #47363 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent fdc59b8 commit 7db2e88

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/api/os.md

+2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ added: v0.3.3
7474
* Returns: {Object\[]}
7575

7676
Returns an array of objects containing information about each logical CPU core.
77+
The array will be empty if no CPU information is available, such as if the
78+
`/proc` file system is unavailable.
7779

7880
The properties included on each object include:
7981

0 commit comments

Comments
 (0)