码迷,mamicode.com
首页 > 编程语言 > 详细

python语法记录

时间:2017-07-03 23:52:31      阅读:263      评论:0      收藏:0      [点我收藏+]

标签:font   bsp   block   pytho   code   this   log   under   ack   

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语法记录

标签:font   bsp   block   pytho   code   this   log   under   ack   

原文地址:http://www.cnblogs.com/ph829/p/7113282.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!