Use java.util.concurrent.locks.Lock.lockInterruptibly().

Even when the task is blocked by the lock, it can get
`InterruptedException`.