Try and finally lock.release