摘要:
资源竞争解决方法 1:加锁,解锁 mutex =threading.Lock() mutex.acquire()#加锁 mutex.release()#解锁 2:容易死锁 需要添加等待时间或者使用算法解决 阅读全文
posted @ 2019-03-14 17:22
quan54
阅读(108)
评论(0)
推荐(0)
摘要:
import threading def test(): #def test(temp): for i in range(4): print(i) def test1(): for i in range(4): print(i) a=10 def main(): t1=threading.Threa 阅读全文
posted @ 2019-03-14 11:15
quan54
阅读(102)
评论(0)
推荐(0)
摘要:
names=["aa","bb","cc"] for i in names: print(i) =>>aa =>>bb =>>cc for i in enmuerate(names): print(1) =>>(0,'aa') =>>(1,'bb') =>>(2,'cc') #增加拆包时 for i 阅读全文
posted @ 2019-03-14 11:09
quan54
阅读(106)
评论(0)
推荐(0)

浙公网安备 33010602011771号