summaryrefslogtreecommitdiffstats
path: root/Lib/concurrent/futures/thread.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-04-12 15:50:20 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-04-12 15:50:20 (GMT)
commit3fdd9b681de6bee616deb98b538370720a39c284 (patch)
treea1e62ffd9e4cd4071f28593853b20044f23750c9 /Lib/concurrent/futures/thread.py
parent4bbde72440018d857e2abfd1165f763bcacce469 (diff)
parent27be5da8310931bfb3c02769f91e67429b08c545 (diff)
downloadcpython-3fdd9b681de6bee616deb98b538370720a39c284.zip
cpython-3fdd9b681de6bee616deb98b538370720a39c284.tar.gz
cpython-3fdd9b681de6bee616deb98b538370720a39c284.tar.bz2
Issue #11815: Remove dead code in concurrent.futures (since a blocking Queue
cannot raise queue.Empty).
Diffstat (limited to 'Lib/concurrent/futures/thread.py')
-rw-r--r--Lib/concurrent/futures/thread.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/concurrent/futures/thread.py b/Lib/concurrent/futures/thread.py
index 93b495f..fbac088 100644
--- a/Lib/concurrent/futures/thread.py
+++ b/Lib/concurrent/futures/thread.py
@@ -60,14 +60,10 @@ class _WorkItem(object):
def _worker(executor_reference, work_queue):
try:
while True:
- try:
- work_item = work_queue.get(block=True)
- except queue.Empty:
- pass
- else:
- if work_item is not None:
- work_item.run()
- continue
+ work_item = work_queue.get(block=True)
+ if work_item is not None:
+ work_item.run()
+ continue
executor = executor_reference()
# Exit if:
# - The interpreter is shutting down OR