CrynetLogistics commented on a change in pull request #18651:
URL: https://github.com/apache/flink/pull/18651#discussion_r816109257



##########
File path: 
flink-connectors/flink-connector-base/src/test/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriterTest.java
##########
@@ -925,6 +964,18 @@ private AsyncSinkWriterImpl(
         }
 
         public void write(String val) throws IOException, InterruptedException 
{
+            boolean canYield = true;
+            while (canYield) {
+                canYield = sinkInitContext.getMailboxExecutor().tryYield();
+            }
+            canYield = true;
+            while (canYield) {
+                canYield = 
sinkInitContextAnyThreadMailbox.getMailboxExecutor().tryYield();
+            }
+            write(val, null);
+        }
+
+        public void writeWithNonMailboxThread(String val) throws IOException, 
InterruptedException {

Review comment:
       Agreed, how about `writeAsNonMailboxThread` to indicate the caller is 
not a mail thread and the callee will not use a different thread?




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to