[Python-Dev] PEP-419: Protecting cleanup statements from interruptions (original) (raw)

Victor Stinner victor.stinner at gmail.com
Thu Apr 19 23:10:23 CEST 2012


PEP: 419 Title: Protecting cleanup statements from interruptions Version: RevisionRevisionRevision Last-Modified: DateDateDate Author: Paul Colomiets <paul at colomiets.name> Status: Draft Type: Standards Track Content-Type: text/x-rst Created: 06-Apr-2012 Python-Version: 3.3

Hi, I think your PEP should at least mention that the signal.pthread_sigmask() exists, function added to Python 3.3.

signal.pthread_sigmask() is maybe less practical than your proposition (each finally block has to be patched), but it is the best way to ignore temporary signals. Using signal.pthread_sigmask(), you guarantee that EINTR will not occurs... if you use it on all threads!

http://mail.python.org/pipermail/python-ideas/2012-April/014749.html

Victor



More information about the Python-Dev mailing list