Add docstrings for utils.host
Cleaning up a little technical debt by adding docstrings for our public APIs. Note: I plan to submit a patch per file as part of this bug work. These patches won't depend on each other. The last patch of the series will close the bug. Change-Id: Ib848349ae8f7497aa9f2646e8db20c26aa4f3d8c Partial-Bug: #1614594
This commit is contained in:
parent
72c7cd2d31
commit
0f80b98b03
@ -15,6 +15,11 @@ import multiprocessing
|
||||
|
||||
|
||||
def cpu_count():
|
||||
"""Get the system CPU count.
|
||||
|
||||
:returns: The number of CPUs on the system as an int. If there's an issue
|
||||
fetching the CPU count on the system, a default value of 1 is returned.
|
||||
"""
|
||||
try:
|
||||
return multiprocessing.cpu_count()
|
||||
except NotImplementedError:
|
||||
|
Loading…
Reference in New Issue
Block a user