Hi,
I create a custom sink following the sample in Custom stream processing
<https://mail.google.com/mail/u/0/?shva=1#inbox?compose=15ba62ec71b3263e>,
When the onPush() implemented like the sample:
public void onPush() throws Exception {
Integer element = grab(in);
System.out.println(element);
pull(in);
}
It works well.
But when I changed it using CompletionStage in the body:
public void onPush() throws Exception {
Integer element = grab(in);
func(element).whenComplete((v, e) -> {
Logger.debug("onPush: pull again");
pull(in);
});
}
where func() return the value of CompletionStage..
I see one 'onPush: pull again' on the console, then no further element
pulled. the program seems hung.
I can not figure out what's wrong with the above code. Your help is
appreciated.
Akka 2.4.17, Play 2.5.14, Java 8-111
Guofeng
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.