摘要: 互斥锁 from threading import Thread,Lock import os,time #互斥锁 def work(): global n lock.acquire() # 锁住n,让他依次执行 temp = n print(n) time.sleep(0.1) n=temp-1 阅读全文
posted @ 2021-02-04 17:42 Mr.zou 阅读(275) 评论(0) 推荐(0) 编辑