Skip to content

Commit b68acc2

Browse files
authored
execute_tasks_h5() wait for future to complete (#712)
1 parent bd45608 commit b68acc2

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

executorlib/task_scheduler/file/shared.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,16 @@ def execute_tasks_h5(
8686
with contextlib.suppress(queue.Empty):
8787
task_dict = future_queue.get_nowait()
8888
if task_dict is not None and "shutdown" in task_dict and task_dict["shutdown"]:
89+
while len(memory_dict) > 0:
90+
memory_dict = {
91+
key: _check_task_output(
92+
task_key=key,
93+
future_obj=value,
94+
cache_directory=cache_dir_dict[key],
95+
)
96+
for key, value in memory_dict.items()
97+
if not value.done()
98+
}
8999
if terminate_function is not None:
90100
for task in process_dict.values():
91101
terminate_function(task=task)

0 commit comments

Comments
 (0)