mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-32576: use queue.SimpleQueue in critical places (#5216)
Where a queue may be invoked from a weakref callback, we need to use the reentrant SimpleQueue.
This commit is contained in:
parent
6027802ca7
commit
ab74504346
3 changed files with 14 additions and 9 deletions
|
@ -128,7 +128,7 @@ class ThreadPoolExecutor(_base.Executor):
|
|||
raise TypeError("initializer must be a callable")
|
||||
|
||||
self._max_workers = max_workers
|
||||
self._work_queue = queue.Queue()
|
||||
self._work_queue = queue.SimpleQueue()
|
||||
self._threads = set()
|
||||
self._broken = False
|
||||
self._shutdown = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue