[issue1779233] PyThreadState_SetAsyncExc and the main thread
Amaury Forgeot d'Arc
report at bugs.python.org
Fri Jul 11 15:30:05 CEST 2008
Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:
Two things may prevent the exception from being seen:
- First, the async exception is not immediate; it is checked every 100
bytecodes (=sys.getcheckinterval()). When testing from the interactive
prompt, try something like "for x in range(100): pass".
- Then, chances are that the exceptions is actually raised, but silently
swallowed somewhere by the interpreter: for example, if the exception is
raised from inside a __getattr__ function of some object, when called by
SetAsyncExc does not seem very reliable...
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list