public boolean waitFor(long timeout, @NotNull TimeUnit unit) throws InterruptedException {
    try {
      myWaitForThreadFuture.get(timeout, unit);
    }
    catch (ExecutionException e) {
      LOG.error(e);
    }
    catch (CancellationException | TimeoutException ignored) { }

    return myWaitForThreadFuture.isDone();
  }
public boolean waitFor(long timeout, @NotNull TimeUnit unit)