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
if timeout is not None:
max_iter = int(timeout / interval)
elif isinstance(proc, int):
# external process and no timeout
max_iter = 1
else:
# for a Python function wait until it finishes
max_iter = float('inf') # <--------------------------
if isinstance(proc, (list, tuple)):
# ... (snip)
else:
# external process
if proc == -1:
proc = os.getpid()
if max_iter == -1:
max_iter = 1
for _ in range(max_iter): # <----------------
ret.append(_get_memory(proc))
time.sleep(interval)
return ret
range(float('inf')) is an error, and max_iter is not used for anything else here.
The text was updated successfully, but these errors were encountered:
it is used in memory_usage function like this:
range(float('inf')) is an error, and max_iter is not used for anything else here.
The text was updated successfully, but these errors were encountered: