deno
20fb456b - fix(ext/node): cpus() should not error when there's no cpu info (#31097)

Commit
343 days ago
fix(ext/node): cpus() should not error when there's no cpu info (#31097) os.cpus() in Node returns an empty array if there is no cpu info. This is also specified in [its documentation](https://nodejs.org/api/os.html#oscpus:~:text=The%20array%20will%20be%20empty%20if%20no%20CPU%20information%20is%20available): "The array will be empty if no CPU information is available, such as if the /proc file system is unavailable." Currently, Deno throws an error instead. Fixes #25929. <!-- Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/contributing 3. Ensure there are tests that cover the changes. -->
Author
Parents
Loading