public static <T> @NotNull List<T> pollAllPendingResults(@NotNull BlockingQueue<Future<T>> queue) {
    List<T> results = new ArrayList<>();
    T result = poolPendingResult(queue);
    while (result != null) {
      results.add(result);
      result = poolPendingResult(queue);
    }
    return results;
  }
public static <T> @NotNull List<T> pollAllPendingResults(@NotNull BlockingQueue<Future<T>> queue)