Skip to content

Commit 1bedb28

Browse files
csm10495picnixz
andauthored
Apply suggestions from code review
Co-authored-by: Bénédikt Tran <[email protected]>
1 parent c16fde5 commit 1bedb28

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Doc/whatsnew/3.14.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,13 +443,13 @@ contextvars
443443

444444
* Support context manager protocol by :class:`contextvars.Token`.
445445
(Contributed by Andrew Svetlov in :gh:`129889`.)
446-
447-
446+
448447
* Add :meth:`concurrent.futures.ProcessPoolExecutor.terminate_workers` and
449448
:meth:`concurrent.futures.ProcessPoolExecutor.kill_workers` as
450449
ways to terminate or kill all living worker processes in the given pool.
451450
(Contributed by Charles Machalow in :gh:`128043`.)
452451

452+
453453
ctypes
454454
------
455455

Lib/concurrent/futures/process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ def _terminate_or_kill_workers(self, operation: _TerminateOrKillOperation):
878878
and no longer usable (for instance, new tasks should not be
879879
submitted).
880880
"""
881-
if operation not in _TerminateOrKillOperation._member_map_.values():
881+
if operation not in _TerminateOrKillOperation:
882882
raise ValueError(f"Unsupported operation: {operation}")
883883

884884
processes = {}

Lib/test/test_concurrent_futures/test_process_pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def mock_start_new_thread(func, *args, **kwargs):
230230

231231
def test_process_pool_executor_terminate_kill_workers(self):
232232
for function_name in ('terminate_workers', 'kill_workers'):
233-
with self.subTest(function_name=function_name):
233+
with self.subTest(function_name):
234234
manager = multiprocessing.Manager()
235235
q = manager.Queue()
236236

0 commit comments

Comments
 (0)