标签:tar append app targe range 线程等待 pen art start
1.多线程等待
import threading,time
def run():
# time.sleep(3)
print(‘哈哈哈‘)
start_time = time.time()
threads = [] #存放启动的5个线程
for i in range(5):
t = threading.Thread(target=run)
t.start()#
threads.append(t)
for lyl in threads: #主线程循环等待5个子线程执行结束
lyl.join()
end_time = time.time()
print(‘run_time..‘,end_time-start_time)
2.
标签:tar append app targe range 线程等待 pen art start
原文地址:https://www.cnblogs.com/cslw5566/p/9107973.html