标签:pre imp sleep rom color start 线程通信 int join()
from threading import Thread from time import sleep a = 1 def foo(): global a a = 1000 def bar(): sleep(1) print("a = ",a) t1 = Thread(target = foo) t2 = Thread(target = bar) t1.start() t2.start() t1.join() t2.join()
标签:pre imp sleep rom color start 线程通信 int join()
原文地址:https://www.cnblogs.com/longyuu/p/14261712.html