AKKA(java) - future - OnComplete.onComplete - 未被调用

时间:2017-12-18 12:25:41

标签: java akka

未调用

OnComplete.onCompleteMyActor中的所选代码已执行)

Future future = ask(actorRef, request, Integer.MAX_VALUE);

future.onComplete(new OnComplete<Object>() {
  @Override
  public void onComplete(Throwable throwable, Object o) throws Throwable {
     // code here is never called
  }
}, system.dispatcher());

我的演员:

class MyActor extends AsbstractActor {
    ...
    sender().tell(response, self());
    this.getContext().getSystem().stop(this.getSelf());
    ...
}

0 个答案:

没有答案