Hi,
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