1u0 commented on a change in pull request #9772: [FLINK-14199] Only use 
dedicated/named classes for mailbox letters. 
URL: https://github.com/apache/flink/pull/9772#discussion_r333384274
 
 

 ##########
 File path: 
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/mailbox/TaskMailboxImplTest.java
 ##########
 @@ -225,18 +223,16 @@ private void testUnblocksInternal(
        /**
         * Test producer-consumer pattern through the mailbox in a concurrent 
setting (n-writer / 1-reader).
         */
-       private void testPutTake(
-                       FunctionWithException<Mailbox, Runnable, Exception> 
takeMethod,
-                       BiConsumerWithException<Mailbox, Runnable, Exception> 
putMethod) throws Exception {
+       private void testPutTake(FunctionWithException<Mailbox, Mail, 
Exception> takeMethod) throws Exception {
                final int numThreads = 10;
                final int numLettersPerThread = 1000;
                final int[] results = new int[numThreads];
                Thread[] writerThreads = new Thread[numThreads];
                Mailbox mailbox = 
taskMailbox.getDownstreamMailbox(DEFAULT_PRIORITY);
                Thread readerThread = new Thread(ThrowingRunnable.unchecked(() 
-> {
-                       Runnable letter;
-                       while ((letter = takeMethod.apply(mailbox)) != 
POISON_LETTER) {
-                               letter.run();
+                       Mail mail;
+                       while ((mail = takeMethod.apply(mailbox)) != 
POISON_LETTER) {
+                               mail.run();
 
 Review comment:
   I think this is lost in translation. `POISON_LETTER` is of `Runnable`, 
`mail` is of `Mail`.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to