运行报错实例代码:
import time import thread def timer(no, interval): cnt = 0 while cnt < 3: print 'Thread:(%d) Time:%s\n' % (no, time.ctime()) time.sleep(interval) cnt += 1 thread.exit_thread() def
运行报错实例代码:
import time import thread def timer(no, interval): cnt = 0 while cnt < 3: print 'Thread:(%d) Time:%s\n' % (no, time.ctime()) time.sleep(interval) cnt += 1 thread.exit_thread() def