From 3e3468ea77be6df51b4af700fbc6af33a7ddc565 Mon Sep 17 00:00:00 2001 From: Benedikt Hilmes Date: Wed, 13 Nov 2024 11:21:02 +0100 Subject: [PATCH] use thread pool --- sisyphus/manager.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sisyphus/manager.py b/sisyphus/manager.py index 44a1e0f..1ff592d 100644 --- a/sisyphus/manager.py +++ b/sisyphus/manager.py @@ -548,11 +548,11 @@ def maybe_clear_state(state, always_clear, action): self.print_state_overview(verbose=True) elif answer.lower() == "y": self.link_outputs = True - threading.Thread(target=create_aliases, args=(self.sis_graph.jobs(),)).start() - threading.Thread( - target=self.check_output, - kwargs={"write_output": self.link_outputs, "update_all_outputs": True, "force_update": True}, - ).start() + self.thread_pool.apply_async(create_aliases, self.sis_graph.jobs()) + self.thread_pool.apply_async( + self.check_output, + kwds={"write_output": self.link_outputs, "update_all_outputs": True, "force_update": True}, + ) break elif answer.lower() == "u": self.link_outputs = True