We need to cancel the schedule regardless of whether we can release or not; we should do it as soon as possible after we get the lock, to minimize the possibility of interrupting the scheduled thread.