code: public static void joinUninterruptibly(Thread toJoin,
        long timeout, TimeUnit unit) {
      Preconditions.checkNotNull(toJoin);
      boolean interrupted = false;
      try {
        long remainingNanos = unit.toNanos(timeout);
        long end = System.nanoTime() + remainingNanos;
        while (true) {
          try {
            // TimeUnit.timedJoin() treats negative timeouts just like zero.
            NANOSECONDS.timedJoin(toJoin, remainingNanos);
            return;
          } catch (InterruptedException e) {
            interrupted = true;
            remainingNanos = end - System.nanoTime();
          }
        }
      } finally {
        if (interrupted) {
          Thread.currentThread().interrupt();
        }
      }
    }
docs: Invokes
  {@code unit.}{@link TimeUnit#timedJoin(Thread, long)
  timedJoin(toJoin, timeout)} uninterruptibly.