No, it isn't. If the "self.lock.acquireNoblock()2 fails the "if" evaluates to false so the "else" is executed, which reacquires the lock.