Skip to content

Commit

Permalink
docs: doc string for _available_cores method
Browse files Browse the repository at this point in the history
  • Loading branch information
gtdang committed Aug 28, 2024
1 parent a385faa commit 0954871
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hnn_core/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,13 @@ def __init__(self, theme_color="#802989",

@staticmethod
def _available_cores():
"""Return the number of available cores to the process.
This is important for systems where the number of available cores is
partitioned such as on HPC systems. Linux and Windows can return cpu
affinity, which is the number of available cores. MacOS can only return
total system cores.
"""
# For macos
if platform.system() == 'Darwin':
return psutil.cpu_count()
Expand Down

0 comments on commit 0954871

Please sign in to comment.