标签:lease int def run start hello lock == pytho
from multiprocessing import Process,Lock
def run_lock(l,i):
l.acquire()
print("Hello ",i)
l.release()
l=Lock()
if __name__=="__main__":
for i in range(10):
p=Process(target=run_lock,args=(l,i))
p.start()
标签:lease int def run start hello lock == pytho
原文地址:http://www.cnblogs.com/xiesongyou/p/7749277.html