AHeise commented on a change in pull request #9564:
[FLINK-12481][FLINK-12482][FLINK-12958] Streaming runtime: integrate mailbox
for timer triggers, checkpoints and AsyncWaitOperator
URL: https://github.com/apache/flink/pull/9564#discussion_r322603656
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/async/Emitter.java
##########
@@ -80,9 +88,14 @@ public void run() {
try {
while (running) {
LOG.debug("Wait for next completed async stream
element result.");
- AsyncResult streamElementEntry =
streamElementQueue.peekBlockingly();
-
- output(streamElementEntry);
+ AsyncResult asyncResult =
streamElementQueue.peekBlockingly();
+ executor.submit(() -> {
+ try {
+ output(asyncResult);
+ } catch (InterruptedException e) {
Review comment:
Yes, I would like to get rid of any blocking methods inside emitter and
`streamElementQueue`.
The main idea is to transfer the results of async operations via letters to
the mailbox thread and then only have non-blocking, non-synchronized data
structures that ensure the ordering of inputs/results. At that point, no
interruptions can occur.
I'm opening a ticket for that.
----------------------------------------------------------------
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