标签:app art rgs exit tar daemon code for lis
threading的join方式使用实例代码import time
import threading
def foo(n):
for i in range(n):
print(i)
time.sleep(1)
t_list = []
for _ in range(2):
t = threading.Thread(target=foo, args=(10, ), daemon=True)
t_list.append(t)
t.start()
for i in t_list:
i.join()
print(‘Main Tread Exiting‘)
标签:app art rgs exit tar daemon code for lis
原文地址:https://blog.51cto.com/windchasereric/2354235