On 08Aug2015 18:17, Chris Angelico <ros...@gmail.com> wrote:
On Sat, Aug 8, 2015 at 6:11 PM, Cameron Simpson <c...@zip.com.au> wrote:
From:


https://docs.python.org/3/library/signal.html#execution-of-python-signal-handlers

we have:

 A Python signal handler does not get executed inside the low-level (C)
signal  handler. Instead, the low-level signal handler sets a flag which
tells the  virtual machine to execute the corresponding Python signal
handler at a later  point(for example at the next bytecode instruction).

Ah, thanks. Most importantly, though: Is there anything in the
*language spec*, or is this a CPython implementation detail?

Signals aren't part of the language spec, surely? Though part of the stdlib clearly.

I'd say the above text from the signal module doco was written from the viewport of CPython, though it is loose enough in terminology (==> allows freedom to implementors) to read like generic Python spec than CPython detail.

The other bit of text I quoted:

 Python signal handlers are always executed in the main Python thread, even
 if the signal was received in another thread.

also reads like specification.

No, I can't prove any of this. It is just how I read the signal module documentation.

Cheers,
Cameron Simpson <c...@zip.com.au>

No good deed shall go unpunished!       - David Wood <davew...@teleport.com>
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to