This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients
Date 2007-01-29.18:36:40
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Can you please explain in what sense the current framework isn't "async safe"? You might be referring to "async-signal-safe functions", which is a term specified by POSIX, referring to functions that may be called in a signal handler. The Python signal handler, signal_handler, calls these functions:

* getpid
* Py_AddPendingCall
* PyOS_setsig
** sigemptyset
** sigaction

AFAICT, this is the complete list of functions called in a signal handler. Of these, only getpid, sigemptyset, and sigaction are library functions, and they are all specified as async-signal safe. So the current implementation is async-signal safe.

Usage of pthread_kill wouldn't make it more platform-specific than your patch. pthread_kill is part of the POSIX standard, and so is pipe(2). So both changes work on a POSIX system, and neither change would be portable if all you have is standard C.
History
Date User Action Args
2007-08-23 15:54:44adminlinkissue1564547 messages
2007-08-23 15:54:44admincreate