将线程添加到列表中join().
join()
from threading import Thread tlist = [] for i in range(3): t = Thread(target=some_function) t.start() tlist.append(t) # wait until threads have finished executing for t in tlist: t.join() print 'complete!'