Skip to content

Commit

Permalink
Add a note to docs about os.cpus() returning an empty list
Browse files Browse the repository at this point in the history
Some developers might be not aware that os.cpus() may return an empty list. This [has caused a bug before](isaacs/promise-call-limit#11).
  • Loading branch information
codedokode authored Apr 1, 2023
1 parent 4c9ec98 commit 35286c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/api/os.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ are always 0.
available to an application. Use
[`os.availableParallelism()`](#osavailableparallelism) for this purpose.

On Linux and Android when `/proc` filesystem is not accessible, this function
may return an empty list.

## `os.devNull`

<!-- YAML
Expand Down

0 comments on commit 35286c4

Please sign in to comment.