摘要: 1 #使用线程锁 2 #要在产生资源抢占的地方加锁 3 #一定不要在IO的地方加,否则就变成同步执行了 4 #coding:utf8 5 import threading 6 import time 7 8 lock = threading.Lock() 9 10 def print_time(th 阅读全文
posted @ 2018-05-21 22:18 隔壁古二蛋 阅读(164) 评论(0) 推荐(0) 编辑