code: private boolean interruptAndJoinThreads(List<Thread> threads) {
      // interrupt and wait for all ongoing create threads
      for(Thread t : threads) {
        t.interrupt();
      }
      for(Thread t : threads) {
        try {
          t.join();
        } catch (InterruptedException e) {
          DataNode.LOG.warn("interruptOngoingCreates: t=" + t, e);
          return false;
        }
      }
      return true;
    }
docs: Try to interrupt all of the given threads, and join on them.
  If interrupted, returns false, indicating some threads may
  still be running.