Show More
@@ -180,6 +180,14 b' class lock(object):' | |||||
180 | self._inherited = True |
|
180 | self._inherited = True | |
181 | return lockname |
|
181 | return lockname | |
182 |
|
182 | |||
|
183 | def reacquire(self): | |||
|
184 | if not self._inherited: | |||
|
185 | raise error.LockInheritanceContractViolation( | |||
|
186 | 'reacquire can only be called after prepinherit') | |||
|
187 | if self.acquirefn: | |||
|
188 | self.acquirefn() | |||
|
189 | self._inherited = False | |||
|
190 | ||||
183 | def release(self): |
|
191 | def release(self): | |
184 | """release the lock and execute callback function if any |
|
192 | """release the lock and execute callback function if any | |
185 |
|
193 |
General Comments 0
You need to be logged in to leave comments.
Login now