mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Remove unused or redundant imports in concurrent.futures and multiprocessing.
This commit is contained in:
parent
f8240d6564
commit
04842a84c3
12 changed files with 7 additions and 28 deletions
|
@ -4,7 +4,6 @@
|
|||
__author__ = 'Brian Quinlan (brian@sweetapp.com)'
|
||||
|
||||
import collections
|
||||
import functools
|
||||
import logging
|
||||
import threading
|
||||
import time
|
||||
|
|
|
@ -221,7 +221,7 @@ def _queue_management_worker(executor_reference,
|
|||
assert sentinels
|
||||
try:
|
||||
result_item = result_queue.get(sentinels=sentinels)
|
||||
except SentinelReady as e:
|
||||
except SentinelReady:
|
||||
# Mark the process pool broken so that submits fail right now.
|
||||
executor = executor_reference()
|
||||
if executor is not None:
|
||||
|
@ -291,7 +291,6 @@ def _check_system_limits():
|
|||
raise NotImplementedError(_system_limited)
|
||||
_system_limits_checked = True
|
||||
try:
|
||||
import os
|
||||
nsems_max = os.sysconf("SC_SEM_NSEMS_MAX")
|
||||
except (AttributeError, ValueError):
|
||||
# sysconf not available or setting not available
|
||||
|
|
|
@ -74,7 +74,7 @@ def _worker(executor_reference, work_queue):
|
|||
work_queue.put(None)
|
||||
return
|
||||
del executor
|
||||
except BaseException as e:
|
||||
except BaseException:
|
||||
_base.LOGGER.critical('Exception in worker', exc_info=True)
|
||||
|
||||
class ThreadPoolExecutor(_base.Executor):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue