mirror of
https://github.com/esphome/esphome.git
synced 2025-03-14 06:38:17 +00:00
Update esphome/core/config.py
This commit is contained in:
parent
98517d08a0
commit
c85def0680
@ -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()
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user