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 2019/06/11 15:35:53 UTC

[GitHub] [flink] StefanRRichter commented on a change in pull request #8692: [FLINK-12804] Introduce mailbox-based ExecutorService

StefanRRichter commented on a change in pull request #8692: [FLINK-12804] Introduce mailbox-based ExecutorService
URL: https://github.com/apache/flink/pull/8692#discussion_r292522410
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java
 ##########
 @@ -995,4 +998,27 @@ public static void handleUncaughtException(CompletableFuture<?> completableFutur
 			}
 		});
 	}
+
+	/**
+	 * Cancels all instances of {@link java.util.concurrent.Future} in the given list of runnables without interrupting.
+	 * This method will suppress unexpected exceptions until the whole list is processed and then rethrow.
+	 *
+	 * @param runnables list of {@link Runnable} candidates to cancel.
+	 */
+	public static void cancelRunnableFutures(@Nonnull List<Runnable> runnables) {
+		RuntimeException suppressedExceptions = null;
+		for (Runnable droppedLetter : runnables) {
 
 Review comment:
   Good idea, I overlook that when I moved the code outside of the mailbox.

----------------------------------------------------------------
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


With regards,
Apache Git Services