summaryrefslogtreecommitdiffstats
path: root/Lib/concurrent/futures/thread.py
diff options
context:
space:
mode:
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