[Python-Dev] Re: Another test_compiler mystery
Armin Rigo
arigo at tunes.org
Mon Aug 16 13:29:16 CEST 2004
Hello Tim,
On Sun, Aug 15, 2004 at 10:50:25PM -0400, Tim Peters wrote:
> > While I'm in a hacking mood, there might be a way to prevent PyErr_Clear()
> > clear away "asynchronuous" exceptions like RuntimeError, MemoryError, and
> > KeyboardInterrupt: (...)
>
> Threads probably complicate that too. It's dreadful that serious
> problems can get transformed into bogus KeyErrors
Yes. Here is a patch attempting to do what I described:
http://www.python.org/sf/1009929
It's an extension of the asynchronous exception mecanism used to signal
between threads. PyErr_Clear() can send some exceptions to its own thread
using this mecanism. (So it is thread-safe.)
Armin
More information about the Python-Dev
mailing list