Antoine Pitrou pit...@free.fr added the comment:
The following works (2.6 and trunk):
import ctypes, thread
ctypes.pythonapi.PyThreadState_SetAsyncExc(
ctypes.c_long(thread.get_ident()),
ctypes.py_object(ZeroDivisionError))
for i in range(1000): pass
The thing to remember is that
Antoine Pitrou pit...@free.fr added the comment:
I've added a test for it in r75499. Now closing this bug, still the
function actually works :-)
--
resolution: - works for me
status: open - closed
___
Python tracker rep...@bugs.python.org
Amaury Forgeot d'Arc [EMAIL PROTECTED] 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
Changes by Thomas Heller [EMAIL PROTECTED]:
--
assignee: theller -
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1779233
___
___
Python-bugs-list
Changes by Christian Heimes:
--
assignee: - theller
nosy: +theller
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1779233
_
___
Python-bugs-list mailing list