摘要: 输入结果 阅读全文
posted @ 2020-03-14 14:52 酷爱。 阅读(85) 评论(0) 推荐(0) 编辑
摘要: ``` import time import threading num = 0 #定义一个全局变量 tolock = threading.Lock() # 创建一把锁 class Mythread(threading.Thread): #继承threading模块的Thread方法 def run(self): #对父类重写 global num #声名修改全局变量 aa=tolock.acqu 阅读全文
posted @ 2020-03-14 14:35 酷爱。 阅读(164) 评论(0) 推荐(0) 编辑