[WIP] bpo-33966, multiprocessing: Fix another handle leak by vstinner · Pull Request #7965 · python/cpython (original) (raw)

When using a pool of processes on Windows, if the worker is
terminated quickly, handles created by DupHandle() on
reduction.dump() can remain open in the parent process causing a
handles leak.

Use a different strategy in the case: keep the handle open in the
parent process for the lifetime of the worker, and the parent becomes
responsible to close the handle when the worker completes.

https://bugs.python.org/issue33966