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.
diff --git a/Lib/concurrent/futures/thread.py b/Lib/concurrent/futures/thread.py
index 2e7100b..6e22950 100644
--- a/Lib/concurrent/futures/thread.py
+++ b/Lib/concurrent/futures/thread.py
@@ -128,7 +128,7 @@
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