lock should return a boolean, add lockInterruptibly