docs: public <T> T doInCriticalSection(Task task, List<Interval> intervals, CriticalAction<T> action) throws Exception
    {
      giant.lock();
  
      try {
        return action.perform(isTaskLocksValid(task, intervals));
      }
      finally {
        giant.unlock();
      }
    }