线程锁

code

import threading
R=threading.Lock()
R.acquire()
'''
对公共数据的操作
'''
R.release()

原文地址:https://www.cnblogs.com/sea-stream/p/14192543.html