public static <T> @Nullable T poolPendingResult(@NotNull BlockingQueue<Future<T>> queue) {
    try {
      Future<T> future = queue.poll();
      if (future == null) {
        return null;
      }
      return future.get();
    }
    catch (InterruptedException | ExecutionException ignored) {
      return null;
    }
  }
public static <T> @Nullable T poolPendingResult(@NotNull BlockingQueue<Future<T>> queue)