同步锁

解决进程间干扰:

  r = threading.Lock()  

  r.acquire

  执行当前代码,代码未执行完,CPU不能执行其他线程

  r.release

原文地址:https://www.cnblogs.com/zzm-blog/p/8798986.html