aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/concurrent/futures/thread.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-04-12 17:48:46 +0200
committerAntoine Pitrou <solipsis@pitrou.net>2011-04-12 17:48:46 +0200
commit27be5da8310931bfb3c02769f91e67429b08c545 (patch)
treea7b3743d5f995c82218f40eb4fdbe5c8867db894 /Lib/concurrent/futures/thread.py
parent35af9536ad914c1b4f8ac2262c055425eec8d34e (diff)
downloadcpython-27be5da8310931bfb3c02769f91e67429b08c545.tar.gz
cpython-27be5da8310931bfb3c02769f91e67429b08c545.zip
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 93b495f55a3..fbac0887a59 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