Skip to content

Commit

Permalink
Make sure to use no more than 61 cpus on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
emlowe committed May 2, 2024
1 parent 1cc6819 commit 2317a4d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion chia/util/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,10 @@ def available_logical_cores() -> int:
assert count is not None
return count

return len(psutil.Process().cpu_affinity())
cores = len(psutil.Process().cpu_affinity())

if sys.platform == "win32":
cores = min(61, cores) # https://github.com/python/cpython/issues/89240


def caller_file_and_line(distance: int = 1, relative_to: Iterable[Path] = ()) -> Tuple[str, int]:
Expand Down

0 comments on commit 2317a4d

Please sign in to comment.