Implements a set of locks.
This abstraction implements a set of shared locks for the same
resource type, distinguished by name. The user can lock a subset of the
resources and the LockSet will take care of acquiring the locks always in
the same order, thus preventing deadlock.
All the locks needed in the same set must be acquired together,
though.
|
|
|
|
|
_is_owned(self)
Is the current thread a current level owner? |
source code
|
|
|
|
_add_owned(self,
name=None)
Note the current thread owns the given lock |
source code
|
|
|
|
_del_owned(self,
name=None)
Note the current thread owns the given lock |
source code
|
|
|
|
_list_owned(self)
Get the set of resource names owned by the current thread |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add(self,
names,
acquired=0,
shared=0)
Add a new set of elements to the set |
source code
|
|
|
|
|