In the video diet program there is an active wait using a while loop. I want to know if this will affect the process execution time greatly and if so what can I replace it with.
main.py
def update_progress_bar(proc, manager, path: str) -> None:
pbar = None
try:
total = get_total_frames(proc)
cont = 0
pbar = initialize_progress_bar(manager, path)
while True:
progress = get_current_frame(proc)
percent = progress / total * 100
pbar.update(percent - cont)
cont = percent
except expect.EOF:
pass
finally:
if pbar is not None:
pbar.close()