From ffd0b5e9e78c07e75abe63fdea67d93f7ee8abf4 Mon Sep 17 00:00:00 2001 From: Albert Zeyer Date: Mon, 16 Dec 2024 18:45:21 +0100 Subject: [PATCH] Fix JobCleaner close, join only when started --- sisyphus/manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sisyphus/manager.py b/sisyphus/manager.py index 93ebd9a..6c1784d 100644 --- a/sisyphus/manager.py +++ b/sisyphus/manager.py @@ -45,7 +45,8 @@ def f(job): def close(self): self.stopped.set() - self.join() + if self.is_alive(): + self.join() self.thread_pool.close()