直接贴上代码

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不断的改变

相关文章:

  • 2022-12-23
  • 2021-07-16
  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-03
  • 2022-12-23
猜你喜欢
  • 2021-12-23
  • 2022-01-07
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
相关资源
相似解决方案