每当在 Jython 中使用代码 thread.interrupt_main() 时,它实际上并不会中断主线程。关于替代品的任何想法?代码如下:
import threading
import dummy_thread as _thread
def exitFunct():
_thread.interrupt_main()
t = threading.Timer(60.0, exitFunct)
t.start()
for i in range(1, 3000):
print i