MCPcopy
hub / github.com/k2-fsa/OmniVoice / drain_completed

Function drain_completed

omnivoice/scripts/denoise_audio.py:979–990  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

977 max_pending = num_processes * 2
978
979 def drain_completed():
980 nonlocal futures
981 done, _ = wait(futures, return_when=FIRST_COMPLETED)
982 for f in done:
983 futures.discard(f)
984 result = f.result()
985 main_progress.update(result["size"])
986 handle_result(result)
987 main_progress.set_postfix(
988 OK=processed_count,
989 Err=error_count,
990 )
991
992 for batch in dataloader:
993 if batch.size == 0:

Callers 1

mainFunction · 0.70

Calls 2

updateMethod · 0.80
handle_resultFunction · 0.70

Tested by

no test coverage detected