cpython/Lib/multiprocessing
Victor Stinner a9b1f84790
gh-107219: Fix concurrent.futures terminate_broken() (#109244)
Fix a race condition in concurrent.futures. When a process in the
process pool was terminated abruptly (while the future was running or
pending), close the connection write end. If the call queue is
blocked on sending bytes to a worker process, closing the connection
write end interrupts the send, so the queue can be closed.

Changes:

* _ExecutorManagerThread.terminate_broken() now closes
  call_queue._writer.
* multiprocessing PipeConnection.close() now interrupts
  WaitForMultipleObjects() in _send_bytes() by cancelling the
  overlapped operation.
2023-09-11 08:11:31 +00:00
..
dummy
__init__.py
connection.py gh-107219: Fix concurrent.futures terminate_broken() (#109244) 2023-09-11 08:11:31 +00:00
context.py
forkserver.py
heap.py
managers.py
pool.py
popen_fork.py
popen_forkserver.py
popen_spawn_posix.py
popen_spawn_win32.py
process.py
queues.py
reduction.py
resource_sharer.py
resource_tracker.py
shared_memory.py
sharedctypes.py
spawn.py
synchronize.py
util.py