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: #47363
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
codedokode authored and RafaelGSS committed Apr 8, 2023
1 parent 9dc6aef commit 0bbce03
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 @@ -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:

Expand Down

0 comments on commit 0bbce03

Please sign in to comment.