Using future callback inside akka actor

前端 未结 4 1621
我在风中等你
我在风中等你 2021-02-13 12:24

I\'ve found in Akka docs:

When using future callbacks, such as onComplete, onSuccess, and onFailure, inside actors you need to carefully avoid closing ove

4条回答
  •  忘掉有多难
    2021-02-13 12:48

    Yes, you should send a message to the enclosing actor if the callback mutates internal state of the actor. This is the easiest (and preferred) way to avoid races.

提交回复
热议问题