From 760aa550e25e3af39ec4945d4343209c11e55677 Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Thu, 30 Dec 2010 19:22:22 +0100 Subject: [PATCH] fix threadpool's joinAll() method Signed-off-by: Torsten Werner --- daklib/threadpool.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/daklib/threadpool.py b/daklib/threadpool.py index 5b17e3c4..f075f5c3 100644 --- a/daklib/threadpool.py +++ b/daklib/threadpool.py @@ -131,14 +131,15 @@ class ThreadPool: # Tell all the threads to quit self.__resizeLock.acquire() try: - self.__setThreadCountNolock(0) - self.__isJoining = True - # Wait until all threads have exited if waitForThreads: + for t in self.__threads: + t.goAway() for t in self.__threads: t.join() del t + self.__setThreadCountNolock(0) + self.__isJoining = True # Reset the pool for potential reuse self.__isJoining = False -- 2.39.2