##// END OF EJS Templates
lock: the correct way to do a trylock() is to use a timeout of 0
Benoit Boissinot -
r9858:ea38a2c1 default
parent child Browse files
Show More
@@ -112,8 +112,7 b' class lock(object):'
112 # if locker dead, break lock. must do this with another lock
112 # if locker dead, break lock. must do this with another lock
113 # held, or can race and break valid lock.
113 # held, or can race and break valid lock.
114 try:
114 try:
115 l = lock(self.f + '.break')
115 l = lock(self.f + '.break', timeout=0)
116 l.trylock()
117 os.unlink(self.f)
116 os.unlink(self.f)
118 l.release()
117 l.release()
119 except error.LockError:
118 except error.LockError:
General Comments 0
You need to be logged in to leave comments. Login now