From 039ac45e17202bdf95604aa7ad455d9066552b38 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 20 Nov 2021 18:48:05 -0800 Subject: [PATCH] Let Job.join accept a timeout. --- voussoirkit/threadpool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/voussoirkit/threadpool.py b/voussoirkit/threadpool.py index c4ef8bd..9cd6c20 100644 --- a/voussoirkit/threadpool.py +++ b/voussoirkit/threadpool.py @@ -414,8 +414,8 @@ class Job: self._done_event.set() - def join(self): + def join(self, timeout=None): ''' Block until this job runs and completes. ''' - self._done_event.wait() + self._done_event.wait(timeout=timeout)