标题:python 3 多线程 实战篇 多线程与锁
-------------------------------------------------------------------------------------------------------------------------------
时间:2018/5/16 18:31:56
-------------------------------------------------------------------------------------------------------------------------------
内容:
# 开启新线程
thread1.start()
thread2.start()
# 等待所有线程完成
thread1.join()
thread2.join()
print "Exiting Main Thread"
列表不是必须的。
问题二:
使用join是为了阻塞当前线程(即主线程),直到两个子线程结束