From 35286c48ce4602c9ef2e019e3342cab9b23139a3 Mon Sep 17 00:00:00 2001 From: codedokode Date: Sat, 1 Apr 2023 15:23:23 +0300 Subject: [PATCH] Add a note to docs about os.cpus() returning an empty list Some developers might be not aware that os.cpus() may return an empty list. This [has caused a bug before](https://github.com/isaacs/promise-call-limit/pull/11). --- doc/api/os.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/os.md b/doc/api/os.md index 3f11ed65e5f163..72553186cff9a6 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -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`