tomorrow多线程启动
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)
本文来自博客园,作者:OTAKU_nicole,转载请注明原文链接:https://www.cnblogs.com/nicole-zhang/p/14875795.html