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

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
 ##########
 @@ -1329,33 +1364,66 @@ public void 
tryHandleCheckpointException(CheckpointMetaData checkpointMetaData,
         */
        public final class ActionContext {
 
-               private final Runnable actionUnavailableLetter = 
ThrowingRunnable.unchecked(mailbox::waitUntilHasMail);
+               private final Runnable actionUnavailableLetter;
+               private final TaskMailboxExecutorServiceImpl 
mailboxExecutorService;
+
+               public ActionContext(TaskMailboxExecutorServiceImpl 
mailboxExecutorService) {
+                       final Mailbox mailbox = 
taskMailboxExecutor.getMailbox();
+                       this.actionUnavailableLetter = 
ThrowingRunnable.unchecked(() -> mailbox.takeMail().run());
+                       this.mailboxExecutorService = mailboxExecutorService;
 
 Review comment:
   Nitpick: you are mixing two fields in the `ActionContext` implementation 
`TaskMailboxExecutorServiceImpl 
    mailboxExecutorService // this` and `TaskMailboxExecutorServiceImpl 
taskMailboxExecutor // enclosing StreamTask`.
   
   Although, I'd expect that they both reference the same object.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to