private static LocalAttachInfo getProcessAttachInfo(String pid, @NotNull Set<String> attachedPids, boolean validate) {
    if (!attachedPids.contains(pid)) {
      Future<LocalAttachInfo> future =
        ApplicationManager.getApplication().executeOnPooledThread(() -> getProcessAttachInfoInt(pid, validate));
      try {
        // attaching ang getting info may hang in some cases
        return future.get(5, TimeUnit.SECONDS);
      }
      catch (Exception e) {
        LOG.info("Timeout while getting attach info", e);
      }
      finally {
        future.cancel(true);
      }
    }
    return null;
  }
private static LocalAttachInfo getProcessAttachInfo(String pid, @NotNull Set<String> attachedPids, boolean validate)