吴裕雄 python深度学习与实践
Posted 天生自然
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了吴裕雄 python深度学习与实践相关的知识,希望对你有一定的参考价值。
#coding = utf8 import threading,time,random count = 0 class MyThread (threading.Thread): def __init__(self,lock,threadName): super(MyThread,self).__init__(name = threadName) self.lock = lock def run(self): global count self.lock.acquire() for i in range(100): count = count + 1 time.sleep(0.3) print(self.getName() , count) self.lock.release() lock = threading.Lock() for i in range(2): MyThread (lock,"MyThreadName:" + str(i)).start()
以上是关于吴裕雄 python深度学习与实践的主要内容,如果未能解决你的问题,请参考以下文章