mirror of
https://github.com/python/cpython.git
synced 2025-08-06 09:59:07 +00:00
Remove concurrent.futures deadcode: process_result_item() (#109906)
process_result_item() cannot be called with an int anymore, the protocol changed.
This commit is contained in:
parent
fbfec5642e
commit
ae1d99c2ed
1 changed files with 8 additions and 18 deletions
|
@ -444,16 +444,6 @@ class _ExecutorManagerThread(threading.Thread):
|
||||||
# Process the received a result_item. This can be either the PID of a
|
# Process the received a result_item. This can be either the PID of a
|
||||||
# worker that exited gracefully or a _ResultItem
|
# worker that exited gracefully or a _ResultItem
|
||||||
|
|
||||||
if isinstance(result_item, int):
|
|
||||||
# Clean shutdown of a worker using its PID
|
|
||||||
# (avoids marking the executor broken)
|
|
||||||
assert self.is_shutting_down()
|
|
||||||
p = self.processes.pop(result_item)
|
|
||||||
p.join()
|
|
||||||
if not self.processes:
|
|
||||||
self.join_executor_internals()
|
|
||||||
return
|
|
||||||
else:
|
|
||||||
# Received a _ResultItem so mark the future as completed.
|
# Received a _ResultItem so mark the future as completed.
|
||||||
work_item = self.pending_work_items.pop(result_item.work_id, None)
|
work_item = self.pending_work_items.pop(result_item.work_id, None)
|
||||||
# work_item can be None if another process terminated (see above)
|
# work_item can be None if another process terminated (see above)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue