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 Dec 16, 2024
1 parent 12e5e7b commit e1b2035
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 @@ -496,6 +496,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 e1b2035

Please sign in to comment.