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 gustavo
Recipients
Date 2007-01-29.11:07:03
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
But if you think about it, support for other cases have to be extensions of this patch.  In an async handler it's not safe to do about anything.  The current framework is not async safe, it just happens to work most of the time.

If we use pthread_kill we will start to enter platform-specific code; what will happen in systems without POSIX threads?  What signal do we use to wake up the main thread?  Do system calls that receive signals return EINTR for this platform or not (can we guarantee it always happens)?  Which one is the main thread anyway?

In any case, anything we want to do can be layered on top of the Py_signal_pipe API in a very safe way, because reading from a pipe is decoupled from the async handler, therefore this handler is allowed to safely do anything it wants, like pthread_kill.  But IMHO that part should be left out of Python; let the frameworks do it themselves.
History
Date User Action Args
2007-08-23 15:54:44adminlinkissue1564547 messages
2007-08-23 15:54:44admincreate