直接贴上代码
import threading def sayhello(): print "hello world" global t #Notice: use global variable! t = threading.Timer(5.0, sayhello) t.start() t = threading.Timer(5.0, sayhello) t.start()
线程t不断的改变
时间: 2024-10-26 05:47:28
直接贴上代码
import threading def sayhello(): print "hello world" global t #Notice: use global variable! t = threading.Timer(5.0, sayhello) t.start() t = threading.Timer(5.0, sayhello) t.start()
线程t不断的改变