From c85def0680a92fe4754919524dbab0cbb86f6591 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 18 Feb 2025 10:05:05 -0600 Subject: [PATCH] Update esphome/core/config.py --- esphome/core/config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/esphome/core/config.py b/esphome/core/config.py index 1d83f0bc2e..359b78acf1 100644 --- a/esphome/core/config.py +++ b/esphome/core/config.py @@ -94,6 +94,10 @@ def valid_project_name(value: str): def get_usable_cpu_count() -> int: + """Return the number of CPUs that can be used for processes. + On Python 3.13+ this is the number of CPUs that can be used for processes. + On older Python versions this is the number of CPUs. + """ return ( os.process_cpu_count() if hasattr(os, "process_cpu_count") else os.cpu_count() )