Zdenek Pavlas added the comment: > This patch isn't safe
Yes, it's broken. Does not work unless thread support was enabled, and locking initialized. There are probably other bugs, too. Not meant to be included, really. But IMO the correct implementation should work along these lines. > the reason why signal handlers are called synchronously from the main loop is > because you can't call arbitrary called on behalf of a signal handler: the > must be async safe. Could you elaborate, please? Suppose Python has called a C module. From Python's POV, an async signal is no different from a synchronous C=>Python callback. Both are safe. > The proper way to do that would be to have a thread dedicated to signal > management (like the Java VM does). Please, don't. Python is bloated enough already. > This patch is invalid (as is the issue). signal.alarm() and ctrl-c not working in modules is not a valid issue? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16560> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com