You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#1078 made me think about this. Basically we make the promise that if the number of CPUs cannot be determined psutil.cpu_count() will return None. Anyway, we should guard against possible incorrect values returned by the kernel (e.g. -1 or 0) and also return None.
The text was updated successfully, but these errors were encountered:
- no longer cache cpu_count() return value in Process.cpu_percent()
- in Process.cpu_percent(), guard against cpu_count() returning None and
assume 1 instead
- add test cases
#1078 made me think about this. Basically we make the promise that if the number of CPUs cannot be determined
psutil.cpu_count()
will return None. Anyway, we should guard against possible incorrect values returned by the kernel (e.g. -1 or 0) and also return None.The text was updated successfully, but these errors were encountered: