摘要: # 导入多线程模块 import threading # 实例化一个RLock对象mlock mlock = threading.RLock() # 将0赋值给num变量 num = 0 # 定义test函数 def test(): global num # 将num变量转换成全局变量 mlock.acquire() # 加锁 '''please w... 阅读全文
posted @ 2017-12-20 11:23 Panisme 阅读(114) 评论(0) 推荐(0) 编辑