Github user StefanRRichter commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5423#discussion_r167556221
  
    --- Diff: flink-core/src/main/java/org/apache/flink/util/FutureUtil.java ---
    @@ -45,4 +52,36 @@ private FutureUtil() {
     
                return future.get();
        }
    +
    +   public static void waitForAll(long timeoutMillis, Future<?>...futures) 
throws Exception {
    +           waitForAll(timeoutMillis, Arrays.asList(futures));
    +   }
    +
    +   public static void waitForAll(long timeoutMillis, Collection<Future<?>> 
futures) throws Exception {
    +           long startMillis = System.currentTimeMillis();
    +           Set<Future<?>> futuresSet = new HashSet<>();
    --- End diff --
    
    I think for all purposes, we do not need a set to deduplicate. If a future 
is contained multiple times and already finished, waiting for it again is 
basically a NOP.


---

Reply via email to