Implements a shared lock.
The lock prevents starvation but does not guarantee that threads will
acquire the shared lock in the order they queued for it, just that they
will eventually do so.
|
|
|
|
|
__check_deleted(self)
Raises an exception if the lock has been deleted. |
source code
|
|
|
__is_sharer(self)
Is the current thread sharing the lock at this time? |
source code
|
|
|
__is_exclusive(self)
Is the current thread holding the lock exclusively at this time? |
source code
|
|
|
|
|
|
int
|
_count_pending(self)
Returns the number of pending acquires. |
source code
|
|
|
__do_acquire(self,
shared)
Actually acquire the lock. |
source code
|
|
|
__can_acquire(self,
shared)
Determine whether lock can be acquired. |
source code
|
|
|
|
|
|
|
acquire(self,
shared=0,
timeout=None,
test_notify=None)
Acquire a shared lock. |
source code
|
|
|
|
|
|
|
|
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|