private static int getMaxBackgroundThreadCount() {
    // note that getMaxBackgroundThreadCount is used to calculate threads count is FilesScanExecutor, which is also used for "FindInFiles"
    return Runtime.getRuntime().availableProcessors() - getCoresToLeaveForOtherActivitiesCount();
  }
private static int getMaxBackgroundThreadCount()