Python——多線程

import time import threading def f0(): pass def f1(a1,a2): time.sleep(5) f0() t= threading.Thread(target=f1,args=(111,112))#創建線程 t.setDaemon(True)#設置爲後臺線程,這裏默認是False,設置爲True之後則主線程
相關文章
相關標籤/搜索