Skip to content

Commit

Permalink
doc: add a note about os.cpus() returning an empty list
Browse files Browse the repository at this point in the history
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: nodejs#47363
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
codedokode authored and Trott committed Apr 4, 2023
1 parent e7bab6c commit dfbad86
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/api/os.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,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:

Expand Down

0 comments on commit dfbad86

Please sign in to comment.