[Python-3000] threading, part 2 (original) (raw)

tomer filiba tomerfiliba at gmail.com
Thu Aug 10 21:14:27 CEST 2006


[Tim]

Me too, although it won't stay that simple, and I'm clear as mud on how implementations other than CPython could implement this.

[Guido]

Another good reason to keep it accessible from the C API only. Now I'm -0 on adding it. I suggest that if someone really wants this accessible from Python, they should research how Jython, IronPython, PyPy and Stackless could handle this, and report their research in a PEP.

then how does interrupt_main work? is it implementation-agnostic?


import thread help(thread.interruptmain) Help on built-in function interrupt_main in module thread:

interrupt_main(...) interrupt_main()

Raise a KeyboardInterrupt in the main thread.
A subthread can use this function to interrupt the main thread.

just let me raise arbitrary exceptions (don't limit it to KeyboardInterrupt)

-tomer



More information about the Python-3000 mailing list