[Python-Dev] Questions about signal handling.
ncoghlan at gmail.com
Mon Sep 24 08:18:13 EDT 2018
On Sat, 22 Sep 2018 at 09:14, Victor Stinner <vstinner at redhat.com> wrote:
> Le sam. 22 sept. 2018 à 01:05, Eric Snow <ericsnowcurrently at gmail.com> a écrit :
> > 3. Why does signal handling operate via the "pending calls" machinery
> > and not distinctly?
> Signals can be received anytime, between two instructions at the
> machine code level. But the Python code base is rarely reentrant.
> Moreover, you can get the signal while you don't hold the GIL :-)
This would actually be the main reason to keep the current behaviour:
at least some folks are running their applications in subthreads as a
workaround to avoid https://bugs.python.org/issue29988 and the general
fact that Ctrl-C handling and deterministic resource cleanup generally
don't get along overly well.
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-Dev