code: @Override
      public final void close() {
          final CompletableFuture<Void> f;
          synchronized (this) {
              if (state == State.STOPPED) {
                  return;
              }
              f = stop(null);
          }
  
          boolean interrupted = false;
          for (;;) {
              try {
                  f.get();
                  break;
              } catch (InterruptedException ignored) {
                  interrupted = true;
              } catch (ExecutionException e) {
                  closeFailed(Exceptions.peel(e));
                  break;
              }
          }
  
          if (interrupted) {
              Thread.currentThread().interrupt();
          }
      }
docs: A synchronous version of {@link #stop(Object)}. Exceptions occurred during shutdown are reported to
  {@link #closeFailed(Throwable)}. No argument (i.e. {@code null}) is passed.