摘要: 步骤:1、新建信号量对象,设置信号量数量2、线程执行方法中,如果能够获取信号量,则执行,信号量为0不可以获取 1 import threading,time 2 3 class MyThread(threading.Thread): 4 def run(self): 5 if sema.acquir 阅读全文
posted @ 2018-03-09 15:39 Alos403 阅读(235) 评论(0) 推荐(0)