Message51160
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. |
|
Date |
User |
Action |
Args |
2007-08-23 15:54:44 | admin | link | issue1564547 messages |
2007-08-23 15:54:44 | admin | create | |
|