Let Pool._threads be a set instead of list.

master
voussoir 2021-11-20 19:39:09 -08:00
parent 305c6bfdf4
commit 9b8dd35658
No known key found for this signature in database
GPG Key ID: 5F7554F8C26DACCB
1 changed files with 1 additions and 1 deletions

View File

@ -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: