import time
from tomorrow import threads

@threads(3)
def print_thread(i):
    time.sleep(2)
    print(time.strftime("%H:%M:%S"),i,"执行完毕")


list = {
    'AAA',
    'BBB',
    'CCC',
}

if __name__ == '__main__':
    for i in list:
        print(time.strftime("%H:%M:%S"),"启动:", i)
        print_thread(i)
        time.sleep(0.5)

tomorrow多线程启动

 

相关文章:

  • 2021-11-27
  • 2022-02-16
  • 2021-09-25
  • 2021-12-07
  • 2022-12-23
猜你喜欢
  • 2021-05-25
  • 2022-12-23
  • 2021-06-08
  • 2022-12-23
  • 2022-12-23
  • 2022-01-21
  • 2022-01-08
相关资源
相似解决方案