From 6d9300aa9de4788a6c6290c8a98b2edb955fc7c3 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 20 Nov 2021 18:48:40 -0800 Subject: [PATCH] Remove task_done since we never call queue.join. --- voussoirkit/threadpool.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/voussoirkit/threadpool.py b/voussoirkit/threadpool.py index 9cd6c20..3920bf6 100644 --- a/voussoirkit/threadpool.py +++ b/voussoirkit/threadpool.py @@ -338,11 +338,9 @@ class ThreadPool: while self._jobs_available.is_set() or not self._result_queue.empty(): job = self._result_queue.get() if job is NO_MORE_JOBS: - self._result_queue.task_done() break job.join() yield job - self._result_queue.task_done() self._result_queue = None if was_paused: