首页 > 代码库 > python语法记录
python语法记录
class threading.Condition(lock=None)
This class implements condition variable objects. A condition variable allows one or more threads to wait until they are notified by another thread.
If the lock argument is given and not None, it must be a Lock or RLock object, and it is used as the underlying lock.
Otherwise, a new RLock object is created and used as the underlying lock.
也就是说,如果condition构造函数lock参数为空的话,会自动创建可重入锁RLock。
可重入锁RLock,同一线程可以多次获取(the same thread may acquire it again without blocking)。
python语法记录
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。