Let Pool._threads be a set instead of list.

This commit is contained in:
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

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: