From 9b8dd35658d92c475c3e8a367fe91a9797d1e0a6 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 20 Nov 2021 19:39:09 -0800 Subject: [PATCH] Let Pool._threads be a set instead of list. --- voussoirkit/threadpool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/voussoirkit/threadpool.py b/voussoirkit/threadpool.py index cf76b70..5bc6c43 100644 --- a/voussoirkit/threadpool.py +++ b/voussoirkit/threadpool.py @@ -174,7 +174,7 @@ class ThreadPool: # Should be held while manipulating self._running_count. self._running_count_lock = threading.Lock() self._size = size - self._threads = [PooledThread(pool=self) for x in range(size)] + self._threads = {PooledThread(pool=self) for x in range(size)} @property def closed(self) -> bool: