code: public LockResult lock(
        final TaskLockType lockType,
        final Task task,
        final Interval interval
    ) throws InterruptedException
    {
      giant.lockInterruptibly();
      try {
        LockResult lockResult;
        while (!(lockResult = tryLock(lockType, task, interval)).isOk()) {
          if (lockResult.isRevoked()) {
            return lockResult;
          }
          lockReleaseCondition.await();
        }
        return lockResult;
      }
      finally {
        giant.unlock();
      }
    }
docs: Acquires a lock on behalf of a task.  Blocks until the lock is acquired.
  
  @param lockType lock type
  @param task     task to acquire lock for
  @param interval interval to lock
  
  @return {@link LockResult} containing a new or an existing lock if succeeded. Otherwise, {@link LockResult} with a
  {@link LockResult#revoked} flag.
  
  @throws InterruptedException if the current thread is interrupted