Let Pool._threads be a set instead of list.
This commit is contained in:
parent
305c6bfdf4
commit
9b8dd35658
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue