Change the idiom:
try: self.lock.acquire() ... finally: self.lock.release() into: self.lock.acquire() try: ... finally: self.lock.release() The old version would mistakenly try to release the lock if there was error in acquiring it.
Showing
Please register or sign in to comment