You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/08/06 08:23:48 UTC

[GitHub] [flink] AHeise commented on a change in pull request #13067: [FLINK-18821][network] Report PartitionRequest failures to subsequent…

AHeise commented on a change in pull request #13067:
URL: https://github.com/apache/flink/pull/13067#discussion_r466231336



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java
##########
@@ -90,6 +90,21 @@
 		}
 	}
 
+	/**
+	 * Fakes asynchronous execution by immediately executing the operation and completing the supplied future
+	 * either noramlly or exceptionally.
+	 *
+	 * @param operation to executed
+	 * @param <T> type of the result
+	 */
+	public static <T> void completeFromCallable(CompletableFuture<T> future, Callable<T> operation) {

Review comment:
       I added a similar method to `FutureUtils` called `runSync` (but it creates a new future). Would it make sense to keep the names in sync? (I have no hard feeling about renaming `runSync`).




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org