import threading
import time
import random
# threading.Thread(target=None, args=())
def hello():
time.sleep(random.random())
print("hello world %d" % threading.active_count())
arr = []
def wait():
for x in arr:
x.join()
print("所有程序执行完毕")
# hello()
for x in range(10):
t = threading.Thread(target=hello)
t.start()
arr.append(t)
threading.Thread(target=wait).start()
print("没有阻塞")
# 没有阻塞