Skip to content

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jun 27, 2018

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

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.
@vstinner
Copy link
Member Author

This change tries to fix https://bugs.python.org/issue33966 but test_wait() hangs with the change. I'm working on a different approach.

@vstinner
Copy link
Member Author

I abandon this change because it changes the semantics: PR #7966 is a simpler and safer approach.

@vstinner vstinner closed this Jun 27, 2018
@vstinner vstinner deleted the spawn_close_source branch June 27, 2018 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants