From 7303d96a305a0a725f751cea39d06c9881bb57af Mon Sep 17 00:00:00 2001 From: codedokode Date: Sat, 1 Apr 2023 15:37:16 +0300 Subject: [PATCH] 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: https://github.com/isaacs/promise-call-limit/pull/11 --- doc/api/os.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/api/os.md b/doc/api/os.md index 3f11ed65e5f1632..ec261dad181f891 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -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` filesystem is unavailable. The properties included on each object include: