大橙子网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
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')