MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / get_finished_process

Function get_finished_process

tools/shared.py:138–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

136 processes = {}
137
138 def get_finished_process():
139 while True:
140 for idx, proc in processes.items():
141 if proc.poll() is not None:
142 return idx
143 # All processes still running; wait a short while for the first
144 # (oldest) process to finish, then look again if any process has completed.
145 idx, proc = next(iter(processes.items()))
146 try:
147 proc.communicate(timeout=0.2)
148 return idx
149 except subprocess.TimeoutExpired:
150 pass
151
152 num_parallel_processes = utils.get_num_cores()
153 temp_files = get_temp_files()

Callers 1

run_multiple_processesFunction · 0.85

Calls 3

communicateMethod · 0.80
nextFunction · 0.50
iterFunction · 0.50

Tested by

no test coverage detected