Windows 如何杀死以thread.start\u new\u thread启动的线程
如何杀死以thread.start\u new\u thread启动的线程?谢谢大家!Windows 如何杀死以thread.start\u new\u thread启动的线程,windows,multithreading,python-2.7,Windows,Multithreading,Python 2.7,如何杀死以thread.start\u new\u thread启动的线程?谢谢大家! import thread def test_thread(): for i in range(100): sleep(1) print('time %r' % time()) print('%r' % 'thread is done') thread.start_new_thread(test_thread,()) 是我的问题的解决方案,线程可以根据需要暂停
import thread
def test_thread():
for i in range(100):
sleep(1)
print('time %r' % time())
print('%r' % 'thread is done')
thread.start_new_thread(test_thread,())
是我的问题的解决方案,线程可以根据需要暂停和恢复。我想杀死它,而不是暂停或恢复