[issue38428] Can't gracefully ctrl+C multiprocessing pool on Python3 & Windows
Rebecca Fair
report at bugs.python.org
Thu Oct 10 04:35:51 EDT 2019
New submission from Rebecca Fair <rebecca.fair at stfc.ac.uk>:
I want to be able to Ctrl+C to exit a multiprocessing Pool.map gracefully, and have made a solution based on this Stack Overflow answer: https://stackoverflow.com/questions/11312525/catch-ctrlc-sigint-and-exit-multiprocesses-gracefully-in-python
However, this solution works on Linux, and on Windows 10 with Python 2.7, but not on Windows 10 with Python 3.7. The Ctrl+C is just ignored and I have to kill the processes manually. I've attached the minimum code required to reproduce the problem.
Is this a bug, expected, or is there a workaround? I believe it might be caused by the behaviour of threading.Condition.wait() being changed in commit 7c3e577 but I don't know enough about signalling to say any more than that
----------
components: Windows
files: bug.py
messages: 354344
nosy: paul.moore, rebeccafair, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Can't gracefully ctrl+C multiprocessing pool on Python3 & Windows
versions: Python 3.7
Added file: https://bugs.python.org/file48653/bug.py
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38428>
_______________________________________
More information about the Python-bugs-list
mailing list